home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / proerr2.zip / PRO2EROR.PRG < prev   
Text File  |  1991-08-22  |  138KB  |  3,946 lines

  1. *:*********************************************************************
  2. *:         System: ERROR HANDLING SYSTEM FOR FOXPRO 2.0
  3. *:         Author: Pat Adams, DB Unlimited
  4. *:      Copyright (c) 1991, Public Domain
  5. *:  Last modified: 08/22/91     16:29
  6. *:
  7. *:  Procs & Fncts: ERORSET
  8. *:               : NO_FILE
  9. *:               : GO_MASTR
  10. *:               : FILE_BUSY
  11. *:               : GO_AGAIN
  12. *:               : TOO_HIGH
  13. *:               : LOWFILES
  14. *:               : INDEX_ER
  15. *:               : SETENVMT
  16. *:               : SAVE_IT
  17. *:               : QQUIT
  18. *:               : NOMEMO
  19. *:               : LOWMEMRY
  20. *:               : BAD_RPT
  21. *:               : BADMEMFL
  22. *:               : NOSPACE
  23. *:               : TO_PRN
  24. *:               : KORRUPT
  25. *:               : REC_BUSY
  26. *:               : READONLY
  27. *:               : BAD_DIF
  28. *:               : BAD_SYLK
  29. *:               : NOTRIGHT
  30. *:               : BADLOTUS
  31. *:               : INVALPRN
  32. *:               : NOTREADY
  33. *:               : SQL_INTL
  34. *:               : SQLTRASH
  35. *:               : NOSQLIDX
  36. *:               : SQL_IDX
  37. *:               : SQLABORT
  38. *:               : BADCHAIN
  39. *:               : BADRIGHTS
  40. *:               : NOCREAT
  41. *:               : READ_ERR
  42. *:               : RITE_ERR
  43. *:               : BADCLOSE
  44. *:               : REALBAD
  45. *:               : VERBOSE
  46. *:               : NORUN
  47. *:               : PKORRUPT
  48. *:               : BADEXCEL
  49. *:               : BADSYMPH
  50. *:               : NOACCESS
  51. *:               : NO_CDX
  52. *:               : PROGBUG
  53. *:               : RAZBERRY
  54. *:               : LOGVIEW
  55. *:               : MEMOVIEW
  56. *:               : YES_NO
  57. *:               : NICECHIM
  58. *:               : A_LERT
  59. *:               : ISLAN
  60. *:               : KANCEL
  61. *:
  62. *:         Set by: ERORSET            (procedure in PRO2EROR.PRG)
  63. *:
  64. *:          Calls: ERORSET            (procedure in PRO2EROR.PRG)
  65. *:               : NO_FILE            (procedure in PRO2EROR.PRG)
  66. *:               : GO_MASTR           (procedure in PRO2EROR.PRG)
  67. *:               : FILE_BUSY          (procedure in PRO2EROR.PRG)
  68. *:               : GO_AGAIN           (procedure in PRO2EROR.PRG)
  69. *:               : TOO_HIGH           (procedure in PRO2EROR.PRG)
  70. *:               : LOWFILES           (procedure in PRO2EROR.PRG)
  71. *:               : INDEX_ER           (procedure in PRO2EROR.PRG)
  72. *:               : SETENVMT           (procedure in PRO2EROR.PRG)
  73. *:               : SAVE_IT            (procedure in PRO2EROR.PRG)
  74. *:               : QQUIT              (procedure in PRO2EROR.PRG)
  75. *:               : NOMEMO             (procedure in PRO2EROR.PRG)
  76. *:               : LOWMEMRY           (procedure in PRO2EROR.PRG)
  77. *:               : BAD_RPT            (procedure in PRO2EROR.PRG)
  78. *:               : BADMEMFL           (procedure in PRO2EROR.PRG)
  79. *:               : NOSPACE            (procedure in PRO2EROR.PRG)
  80. *:               : TO_PRN             (procedure in PRO2EROR.PRG)
  81. *:               : KORRUPT            (procedure in PRO2EROR.PRG)
  82. *:               : REC_BUSY           (procedure in PRO2EROR.PRG)
  83. *:               : READONLY           (procedure in PRO2EROR.PRG)
  84. *:               : BAD_DIF            (procedure in PRO2EROR.PRG)
  85. *:               : BAD_SYLK           (procedure in PRO2EROR.PRG)
  86. *:               : NOTRIGHT           (procedure in PRO2EROR.PRG)
  87. *:               : BADLOTUS           (procedure in PRO2EROR.PRG)
  88. *:               : INVALPRN           (procedure in PRO2EROR.PRG)
  89. *:               : NOTREADY           (procedure in PRO2EROR.PRG)
  90. *:               : SQL_INTL           (procedure in PRO2EROR.PRG)
  91. *:               : SQLTRASH           (procedure in PRO2EROR.PRG)
  92. *:               : NOSQLIDX           (procedure in PRO2EROR.PRG)
  93. *:               : SQL_IDX            (procedure in PRO2EROR.PRG)
  94. *:               : SQLABORT           (procedure in PRO2EROR.PRG)
  95. *:               : BADCHAIN           (procedure in PRO2EROR.PRG)
  96. *:               : BADRIGHTS          (procedure in PRO2EROR.PRG)
  97. *:               : NOCREAT            (procedure in PRO2EROR.PRG)
  98. *:               : READ_ERR           (procedure in PRO2EROR.PRG)
  99. *:               : RITE_ERR           (procedure in PRO2EROR.PRG)
  100. *:               : BADCLOSE           (procedure in PRO2EROR.PRG)
  101. *:               : REALBAD            (procedure in PRO2EROR.PRG)
  102. *:               : VERBOSE            (procedure in PRO2EROR.PRG)
  103. *:               : NORUN              (procedure in PRO2EROR.PRG)
  104. *:               : PKORRUPT           (procedure in PRO2EROR.PRG)
  105. *:               : BADEXCEL           (procedure in PRO2EROR.PRG)
  106. *:               : BADSYMPH           (procedure in PRO2EROR.PRG)
  107. *:               : NOACCESS           (procedure in PRO2EROR.PRG)
  108. *:               : NO_CDX             (procedure in PRO2EROR.PRG)
  109. *:               : PROGBUG            (procedure in PRO2EROR.PRG)
  110. *:
  111. *:      Documented 08/22/91 at 16:29               FoxDoc  version 2.10
  112. *:*********************************************************************
  113. *   PROGRAM: PRO2EROR.PRG
  114. *   VERSION: Beta 0.01
  115. *   AUTHOR:  Pat Adams, DB Unlimited  (718) 469-4032
  116. *   DATE:    8/22/91
  117. *
  118. *   Special thanks to Menachem Bazian, Blaise Mitsutama, John
  119. *   Hoffman, Jordan Powell and Jeri Rosenhaft for their assistance
  120. *   in alpha testing and suggestions for additional features.
  121. *
  122. *   USE RESTRICTIONS: You may use PRO2EROR and modifications
  123. *   thereof as part of your applications without prior authorization
  124. *   from DB Unlimited and without payment to DB Unlimited.  PRO2EROR
  125. *   may be freely distributed on electronic BBSes and via non-profit
  126. *   user group disk libraries.  PRO2EROR and modifications thereof
  127. *   may *NOT* be sold as shareware or as a commercial product.  Use of
  128. *   the PRO2EROR routine and modifications thereof in articles and
  129. *   books is reserved solely to DB Unlimited.
  130. *
  131. *   NOTE: This routine is specific to FoxPro 2.x.  Because it
  132. *   uses commands and functions new in FoxPro 2.x it will not
  133. *   work properly with FoxPro 1.x.  The original PROERROR.PRG
  134. *   should be used with FoxPro 1.x.
  135. *
  136. *   Information is stored to the PRO2EROR.DBF file and then
  137. *   the user is returned to master calling program if a RETRY
  138. *   is not issued.  Please note that PRO2EROR closes all files
  139. *   and indexes before issuing a RETURN TO MASTER.  PRO2EROR expects
  140. *   that the MASTER level file will (re) initialize all necessary global
  141. *   memvars, open databases and indexes, etc. as required for a
  142. *   particular system.
  143. *
  144. *   When it is necessary to provide the user with the name and phone
  145. *   number of an individual to call regarding an error the CALLWHOM
  146. *   database is opened and the record for the appropriate individual
  147. *   is sought.  The titles supplied in the CALLWHOM database which
  148. *   accompanies this program should not be changed without modification
  149. *   of the PRO2EROR program.  The information for DEVELOPER is displayed
  150. *   if the error is the result of a programming bug or syntax error.
  151. *   Information for APP ADMINISTRATOR is called if files are missing
  152. *   or other errors occur which require the attention of the applications
  153. *   administrator.  LAN ADMINISTRATOR information is displayed if the
  154. *   errors are related to specific LAN situations such as inappropriate
  155. *   user authorizations on the LAN.
  156. *
  157. *   Initalizing a logical PUBLIC memvar named TESTING during test cycles
  158. *   of your code will trigger an option in the STORE_IT module which
  159. *   will provide you with the option of viewing the PRO2EROR file at
  160. *   the time the error condition occurs.  This module also permits
  161. *   exit to DOS via use of the CONTROL-Q key combination.  If the
  162. *   interactive version of FoxPro 2.0 is in use the ESC key can be
  163. *   used to return to the command window after viewing the error log.
  164. *
  165. *   Utilize the following command to set up this system to
  166. *   respond to FoxPro 2.x errors:
  167. *
  168. *   ON ERROR DO PRO2EROR WITH ERROR(), MESSAGE(), MESSAGE(1), ;
  169. *      SYS(16), LINENO(), SYS(102), SYS(100), SYS(101), LASTKEY(), ;
  170. *       DBF(), SYS(18), SYS(5), SYS(12), SYS(6), SYS(2003), WONTOP(), ;
  171. *       SYS(2011), SYS(2018)
  172. *
  173. *   or as an alternative:
  174. *
  175. *       [SET PROCEDURE TO pro2eror]
  176. *       DO erorset
  177. *
  178. *  Parameters are:
  179. *
  180. *   xerno =    The numeric code of the number provided by ERROR()
  181. *   xmsg =     The error message provided by MESSAGE()
  182. *   xkode =    The contents of the line of code which
  183. *                 triggered the error as provided by MESSAGE(1)
  184. *   xmodul =   The name of the code module, SYS(16)
  185. *   xline =    The number of the line of code triggering the
  186. *                 error, LINENO()
  187. *   xprint =    Current PRINTER setting as per SYS(102)
  188. *   xkonsol =   Current CONSOLE setting as per SYS(100)
  189. *   xdevice =   Current DEVICE setting as per SYS(101)
  190. *   keypress =  LASTKEY()
  191. *   curr_dbf =  Selected .DBF when error occurred
  192. *   getfield =  Field of GET...READ at time error occurred
  193. *   def_drive = Default drive at time error occurred - SYS(5)
  194. *   run_memry = Amount of DOS memory available for RUN command - SYS(12)
  195. *   prnt_devic= Current SET PRINTER TO setting - SYS(6)
  196. *   cur_direc = Current directory at time error occurred - SYS(2003)
  197. *   top_win =   Top window at time error occurred
  198. *   xlocked =   Record or file lock status at time error occured -
  199. *                 SYS(2011)  NOTE: This should be removed for
  200. *                 single user applications
  201. *   xmissing =  Missing file, window, etc.
  202. *
  203. *  In addition to this information, the routine saves the information
  204. *  from LIST MEMORY and LIST STATUS is saved into the memo field.
  205. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  206. PARAMETERS xerno, xmsg, xkode, xmodul, xline, xprint, ;
  207.     xkonsol, xdevice, keypress, curr_dbf, getfield, def_drive, ;
  208.     run_memry, prnt_devic, cur_direc, top_win, xlocked, xmissing
  209. PRIVATE tryagain, lstext, lmtext, printit
  210. STORE .F. TO tryagain
  211. ON ERROR ?? CHR(7)
  212. CLEAR TYPEAHEAD
  213.  
  214. IF xerno=104 .OR. xerno=181 .OR. xerno=182 .OR. xerno=279;
  215.         .OR. xerno=4 .OR. xerno=1107 .OR. xerno=1001
  216.     * ===========================================================
  217.     *$ Ignore these errors and continue with program execution
  218.     *
  219.     * Error #104 occurs when ON KEY LABEL calls to function keys
  220.     * F11 and F12 are made on older keyboards which do not support
  221.     * these keys.  It does not trap illegal SET FUNCTION x calls.
  222.     *
  223.     * Error #181, "MENU is already in use", occurs when an
  224.     * attempt is made to activate a MENU which has already
  225.     * been activated.
  226.     *
  227.     * Error #182, "POPUP is already in use", occurs when an
  228.     * attempt is made to activate a POPUP which has already
  229.     * been activated.
  230.     *
  231.     * Error #279, "Prompts for this popup have already been
  232.     * defined" occurs when an attempt is made to use the BAR
  233.     * option to define contents of a POPUP already defined
  234.     * with PROMPT.
  235.     *
  236.     * Error #4 = "End of file encountered"
  237.     *
  238.     * Error #1107 = "Structural CDX file reference removed"
  239.     *
  240.     * Error #1001 = "Feature not available"  In some instances
  241.     *               the single-user version of FoxPro 2.0 may
  242.     *               return this error when multi-user commands
  243.     *               are utilized.
  244.     * ===========================================================
  245.     SET CONSOLE &xkonsol
  246.     * =========================================
  247.     * ¯o substitution is utilized since
  248.     * EVALUATE() does not work with SET commands
  249.     * =========================================
  250.     SET DEVICE TO &xdevice
  251.     DO erorset
  252.     * ==================================================
  253.     * Ignore the error and return to the line of
  254.     * code following the one which generated the error
  255.     * ==================================================
  256.     RETURN
  257. ENDIF (xerno=104 .OR. xerno=181 .OR. xerno=182 .OR. xerno=279;)
  258.  
  259. SET TALK OFF
  260. SET PRINT OFF
  261. SET PRINTER TO prn
  262. SET DEVICE TO SCREEN
  263.  
  264. DO CASE xerno
  265.     CASE xerno = 1 .OR. xerno = 802 .OR. xerno = 1162
  266.         * =================================================
  267.         *$ File does not exist or can not be found.
  268.         *  Error #1 applies to standard FoxPro file while
  269.         *  error #802 specifically references a SQL database
  270.         *  Error #1162 applies to an unfound PROCEDURE
  271.         *  Pop up window to inform user
  272.         * =================================================
  273.         DO no_file WITH xmissing
  274.         DO go_mastr
  275.         
  276.     CASE xerno = 3 .OR. xerno = 108
  277.         * ============================================================
  278.         *$ Advise user file is in use and provide option to try again
  279.         *  NOTE: This case statement can be omitted for single user aps
  280.         *        since it will only be triggered in FoxPro LAN.
  281.         * ============================================================
  282.         DO file_busy WITH tryagain
  283.         
  284.         IF tryagain
  285.             * =============================
  286.             *$ Retry for use of the file
  287.             * =============================
  288.             DO go_again
  289.             RETRY
  290.         ELSE
  291.             * ============================================
  292.             *$ Abort and return to the MASTER module
  293.             *  Information is saved to PRO2EROR database
  294.             *  to provide a log of how often LAN users can
  295.             *  not get use of a file.  If this situation
  296.             *  occurs frequently it may mean that others on
  297.             *  the LAN are using files interactively with
  298.             *  EXCLUSIVE ON, that REPROCESS needs a higher
  299.             *  value or that the source code needs to be
  300.             *  rewritten to avoid such frequent contentions.
  301.             * ============================================
  302.             DO go_mastr
  303.         ENDIF (tryagain)
  304.         
  305.     CASE xerno = 5
  306.         * =======================================
  307.         *$ Record is out of range
  308.         *  Advise user & return to MASTER module
  309.         * =======================================
  310.         DO too_high
  311.         DO go_mastr
  312.         
  313.     CASE xerno = 6
  314.         * =====================
  315.         *$ Too many files open
  316.         * =====================
  317.         DO lowfiles
  318.         DO go_mastr
  319.         
  320.     CASE xerno = 19 .OR. xerno = 20 .OR. xerno = 114
  321.         * ==============================================
  322.         *$ Index error problems - Recreate indexes
  323.         * ==============================================
  324.         DO index_er
  325.         DO setenvmt
  326.         DO save_it
  327.         * ==============
  328.         *$ Quit to DOS
  329.         * ==============
  330.         DO qquit
  331.         
  332.     CASE xerno = 38
  333.         * ==============================================
  334.         *$ Attempt has been made to position record
  335.         *  pointer before the first record in the file.
  336.         *  Correct by going to top of file, skipping down
  337.         *  one record, then retrying the same command line.
  338.         * ==============================================
  339.         GO TOP
  340.         SKIP
  341.         DO go_again
  342.         RETRY
  343.         
  344.     CASE xerno = 41
  345.         * =========================================
  346.         *$ Missing or invalid MEMO file
  347.         *  NOTE: Depending upon the application,
  348.         *  it may be desirable to modify this
  349.         *  CASE statement to return the user to DOS
  350.         * =========================================
  351.         DO nomemo
  352.         DO go_mastr
  353.         
  354.     CASE xerno = 43 .OR. xerno = 809 .OR. xerno = ;
  355.             845 .OR. xerno = 1149 .OR. xerno = 1150 ;
  356.             .OR. xerno = 1151 .OR. xerno = 1600
  357.         * ==============================
  358.         *$ Insufficient memory
  359.         * ==============================
  360.         DO lowmemry
  361.         DO setenvmt
  362.         DO save_it
  363.         * ==============
  364.         *$ Quit to DOS
  365.         * ==============
  366.         DO qquit
  367.         
  368.     CASE xerno = 50 .OR. xerno = 54 .OR. xerno = 1241 ;
  369.             .OR. xerno = 1243 .OR. xerno = 1245 .OR. ;
  370.             xerno = 1246 .OR. xerno = 1645 .OR. ;
  371.             xerno = 1646 .OR. xerno = 1647
  372.         * ===============================================
  373.         *$ Report form or label form problems
  374.         * ===============================================
  375.         DO bad_rpt WITH xerno
  376.         DO go_mastr
  377.         
  378.     CASE xerno = 55
  379.         * ======================
  380.         *$ Invalid .MEM file
  381.         * ======================
  382.         DO badmemfl
  383.         * ==================================
  384.         * NOTE: If info in the .MEM file is
  385.         * necessary for the entire application
  386.         * this should be changed so user is
  387.         * returned to DOS
  388.         * =================================
  389.         DO go_mastr
  390.         
  391.     CASE xerno = 56
  392.         * =========================================
  393.         *$ Out of disk space error.  Return to DOS
  394.         * =========================================
  395.         STORE .F. TO printit
  396.         DO nospace WITH printit
  397.         
  398.         IF printit
  399.             * ============================
  400.             * Send error info to printer
  401.             * ============================
  402.             DO to_prn
  403.         ENDIF (printit)
  404.         * ======================================
  405.         *$ Quit to DOS - No attempt is
  406.         *$ made to close databases since
  407.         *$ the error condition may preclude it
  408.         * ======================================
  409.         SET CURSOR ON
  410.         SET COLOR TO W/N
  411.         CLEAR
  412.         SET CLEAR OFF          && Suppresses "Normal Shutdown" message
  413.         QUIT
  414.         
  415.     CASE xerno = 67 .OR. xerno = 1309
  416.         * ===================================================
  417.         *$ Expression evaluator fault.  Object file corrupted
  418.         * ===================================================
  419.         DO korrupt
  420.         DO go_mastr
  421.         
  422.     CASE xerno = 109
  423.         * ========================================
  424.         *$ Record is locked by another user
  425.         *  Inform user & provide option to retry
  426.         * ========================================
  427.         DO rec_busy WITH tryagain
  428.         
  429.         IF tryagain
  430.             * =============================
  431.             *$ Retry for use of the file
  432.             * =============================
  433.             DO go_again
  434.             RETRY
  435.         ELSE
  436.             * ============================================
  437.             *$ Abort and return to the MASTER module
  438.             *  Information is saved to PRO2EROR database
  439.             *  to provide a log of how often LAN users can
  440.             *  not get use of a record.  If this situation
  441.             *  occurs frequently it may mean that a
  442.             *  different methodology is required in the
  443.             *  source code to prevent a high incidents of
  444.             *  contentions or that REPROCESS needs to be
  445.             *  set to a higher value
  446.             * ============================================
  447.             DO go_mastr
  448.         ENDIF (tryagain)
  449.         
  450.     CASE xerno = 111
  451.         * ===============================================
  452.         *$ Attempt was made to write to a read-only file
  453.         * ===============================================
  454.         DO readonly
  455.         DO go_mastr
  456.         
  457.     CASE xerno = 115 .OR. xerno = 116 .OR. xerno = 117
  458.         * =========================================
  459.         *$ Invalid DIF file header
  460.         *$ Invalid DIF vector/DBF field mismatch
  461.         *$ Invalid DIF type indicator
  462.         * =========================================
  463.         DO bad_dif
  464.         DO go_mastr
  465.         
  466.     CASE xerno = 119 .OR. xerno = 120 .OR. xerno = 121
  467.         * ================================================
  468.         *$ Invalid SYLK file header
  469.         *$ Invalid SYLK file dimension bounds
  470.         *$ Invalid SYLK file format
  471.         * ================================================
  472.         DO bad_sylk
  473.         DO go_mastr
  474.         
  475.     CASE xerno = 255 .OR. xerno = 256
  476.         * ===========================================
  477.         *$ Not a valid RapidFile or Framework II file
  478.         * ===========================================
  479.         DO notright WITH xerno
  480.         DO go_mastr
  481.         
  482.     CASE xerno = 297 .OR. xerno = 1662 .OR. xerno = 1678
  483.         * ======================================
  484.         *$ Invalid Lotus 1-2-3 version X file
  485.         * ======================================
  486.         DO badlotus WITH xerno
  487.         DO go_mastr
  488.         
  489.     CASE xerno = 124
  490.         * =============================
  491.         *$ Invalid printer redirection
  492.         * =============================
  493.         DO invalprn
  494.         DO go_mastr
  495.         
  496.     CASE xerno = 125
  497.         * ===========================================
  498.         * Printer not ready.
  499.         * Provide user with option to retry
  500.         * for use of printer or abort to MASTER
  501.         * ===========================================
  502.         DO notready WITH tryagain
  503.         
  504.         IF tryagain
  505.             * =============================
  506.             *$ Retry for use of printer
  507.             * =============================
  508.             DO go_again
  509.             RETRY
  510.         ELSE
  511.             * ======================================
  512.             *$ Abort and return to the MASTER module
  513.             * ======================================
  514.             DO go_mastr
  515.         ENDIF (tryagain)
  516.         
  517.     CASE xerno = 176 .OR. xerno = 177
  518.         * =======================================
  519.         *$ Error #176 - Cannot clear menu in use
  520.         *$ Error #177 - Cannel clear popup in use
  521.         *
  522.         *  Attempt was made to CLEAR or RELEASE
  523.         *  MENU or POPUP which has not been
  524.         *  deactivated.  Simply DEACTIVATE and
  525.         *  RETRY the command.
  526.         * =======================================
  527.         IF xerno = 176
  528.             DEACTIVATE MENU
  529.         ELSE
  530.             DEACTIVATE POPUP
  531.         ENDIF (xerno = 176)
  532.         
  533.         DO go_again
  534.         RETRY
  535.         
  536.     CASE xerno = 800
  537.         * =======================
  538.         *$ Interal SQL error
  539.         * =======================
  540.         DO sql_intl
  541.         DO setenvmt
  542.         DO save_it
  543.         * =============
  544.         *$ Quit to DOS
  545.         * =============
  546.         DO qquit
  547.         
  548.     CASE xerno = 821
  549.         * ========================================
  550.         *$ Temporary SQL file has been corrupted
  551.         * ========================================
  552.         DO sqltrash
  553.         DO go_mastr
  554.         
  555.     CASE xerno = 830
  556.         * =========================
  557.         *$ SQL index not found
  558.         * =========================
  559.         DO nosqlidx
  560.         DO go_mastr
  561.         
  562.     CASE xerno = 831
  563.         * ==================================
  564.         *$ SQL err buiding temporary index
  565.         * ==================================
  566.         STORE .F. TO printit
  567.         DO sql_idx WITH printit
  568.         
  569.         IF printit
  570.             * ============================
  571.             * Send error info to printer
  572.             * ============================
  573.             DO to_prn
  574.         ENDIF (printit)
  575.         * ======================================
  576.         *$ Quit to DOS - No attempt is
  577.         *$ made to close databases since
  578.         *$ the error condition may preclude it
  579.         * ======================================
  580.         SET CURSOR ON
  581.         SET COLOR TO W/N
  582.         CLEAR
  583.         SET CLEAR OFF          && Suppresses "Normal Shutdown" message
  584.         QUIT
  585.         
  586.     CASE xerno = 839
  587.         * =======================================
  588.         *$ User pressed ESC during SQL operation
  589.         * =======================================
  590.         STORE .F. TO kancel
  591.         DO sqlabort WITH kancel
  592.         
  593.         IF kancel
  594.             * ============================
  595.             *$ Return to Main Menu if user
  596.             *$ really wants to abort
  597.             * ============================
  598.             DO go_mastr
  599.         ELSE
  600.             * ============================
  601.             *$ Otherwise retry query
  602.             * ============================
  603.             DO go_again
  604.             RETRY
  605.         ENDIF (kancel)
  606.         
  607.     CASE xerno = 1012
  608.         * =========================================
  609.         *$ OS free memory chain has been scrambled.
  610.         *  The only solution is to return to DOS.
  611.         * =========================================
  612.         DO badchain
  613.         DO setenvmt
  614.         DO save_it
  615.         * =============
  616.         *$ Quit to DOS
  617.         * =============
  618.         DO qquit
  619.         
  620.     CASE xerno = 1101
  621.         * ====================
  622.         *$ Cannot open file
  623.         * ====================
  624.         DO badrights
  625.         DO qquit
  626.         
  627.     CASE xerno = 1102 .OR. xerno = 1157 .OR. xerno = 1410
  628.         * ==================================
  629.         *$ Can not create file or update file
  630.         * ==================================
  631.         DO nocreat
  632.         * ============================
  633.         *$ Send error info to printer
  634.         * ============================
  635.         DO to_prn
  636.         DO qquit
  637.         
  638.     CASE xerno = 1104
  639.         * =====================
  640.         *$ File read error
  641.         * =====================
  642.         DO read_err WITH tryagain
  643.         
  644.         IF tryagain
  645.             * =============================
  646.             *$ Retry for use of the file
  647.             * =============================
  648.             DO go_again
  649.             RETRY
  650.         ELSE
  651.             * =======================================
  652.             *$ Abort and return to the MASTER module
  653.             *  Information is saved to PRO2EROR database
  654.             * =======================================
  655.             DO go_mastr
  656.         ENDIF (tryagain)
  657.         
  658.     CASE xerno = 1105
  659.         * ===================
  660.         *$ File write error
  661.         * ===================
  662.         DO rite_err WITH tryagain
  663.         
  664.         IF tryagain
  665.             * =============================
  666.             *$ Retry for use of the file
  667.             * =============================
  668.             DO go_again
  669.             RETRY
  670.         ELSE
  671.             * =======================================
  672.             *$ Abort and return to the MASTER module
  673.             *  Information is saved to PRO2EROR database
  674.             * =======================================
  675.             DO go_mastr
  676.         ENDIF (tryagain)
  677.         
  678.     CASE xerno = 1112
  679.         * =====================
  680.         *$ File close error
  681.         * =====================
  682.         DO badclose WITH tryagain
  683.         
  684.         IF tryagain
  685.             * =============================
  686.             *$ Try to close the file again
  687.             * =============================
  688.             DO go_again
  689.             RETRY
  690.         ELSE
  691.             * =======================================
  692.             *$ Abort to DOS
  693.             *  Information is saved to PRO2EROR database
  694.             * =======================================
  695.             DO setenvmt
  696.             DO save_it
  697.             DO qquit
  698.         ENDIF (tryagain)
  699.         
  700.     CASE xerno = 1115 .OR. xerno = 15
  701.         * =========================
  702.         *$ Database is trashed
  703.         * =========================
  704.         DO realbad
  705.         DO go_mastr
  706.         
  707.     CASE xerno = 1201 .OR. xerno = 1308
  708.         * =====================================
  709.         *$ Too many names used (1201)
  710.         *$ or stack overflow (1308)
  711.         *  Since the NAMES table has been
  712.         *  exhausted it will may not be
  713.         *  possible to open the CALLWHOM or
  714.         *  PRO2EROR databases to save the info
  715.         * =====================================
  716.         STORE .F. TO printit
  717.         DO verbose WITH printit
  718.         
  719.         IF printit
  720.             * ============================
  721.             * Send error info to printer
  722.             * ============================
  723.             DO to_prn
  724.         ENDIF (printit)
  725.         * ===============
  726.         *$ Quit to DOS
  727.         * ===============
  728.         DO qquit
  729.         
  730.     CASE xerno = 1405
  731.         * ========================
  732.         *$ RUN/! command failed
  733.         * ========================
  734.         DO norun
  735.         DO go_mastr
  736.         
  737.     CASE xerno = 1643 .OR. xerno = 1644
  738.         * ========================================
  739.         *$ Printer driver is corrupted or missing
  740.         *  Abort & return to Master Module
  741.         * ========================================
  742.         DO pkorrupt
  743.         DO go_mastr
  744.         
  745.     CASE xerno = 1661
  746.         * =========================================
  747.         *$ Invalid Excel version 2.0 file format
  748.         * =========================================
  749.         DO badexcel
  750.         DO go_mastr
  751.         
  752.     CASE xerno = 1673 .OR. xerno = 1674
  753.         * ========================================
  754.         *$ Invalid Symphony version X file format
  755.         * ========================================
  756.         DO badsymph WITH xerno
  757.         DO go_mastr
  758.         
  759.     CASE xerno = 1705 .OR. xerno = 823
  760.         * ========================================
  761.         *$ File access denied
  762.         *  Abort & return to MASTER module
  763.         *  Error 823 is generated when a SQL open
  764.         *  of a specific file fails.
  765.         * ========================================
  766.         DO noaccess
  767.         DO go_mastr
  768.         
  769.     CASE xerno = 1707
  770.         * ================================================
  771.         *$ Structural .CDX is missing & must be recreated
  772.         * ================================================
  773.         DO no_cdx
  774.         DO setenvmt
  775.         DO save_it
  776.         * ==============
  777.         *$ Quit to DOS
  778.         * ==============
  779.         DO qquit
  780.         
  781.     OTHERWISE
  782.         DO progbug
  783.         DO go_mastr
  784. ENDCASE   xerno
  785. * End procedure PRO2EROR
  786.  
  787.  
  788.  
  789. *!*********************************************************************
  790. *!
  791. *!      Procedure: GO_MASTR
  792. *!
  793. *!      Called by: PRO2EROR.PRG                      
  794. *!
  795. *!          Calls: SETENVMT           (procedure in PRO2EROR.PRG)
  796. *!               : SAVE_IT            (procedure in PRO2EROR.PRG)
  797. *!               : ERORSET            (procedure in PRO2EROR.PRG)
  798. *!
  799. *!*********************************************************************
  800. PROCEDURE go_mastr
  801. ***********************************************************************
  802. * Save info to PRO2EROR database, reset
  803. * environmentals and return to master module
  804. *
  805. *   Author: Pat Adams  (718) 469-4032
  806. *   Date: 8/20/91
  807. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  808. DO setenvmt
  809. * ==============================
  810. *$ Save info to PRO2EROR database
  811. * ==============================
  812. DO save_it
  813. DO erorset
  814. * ==================================
  815. *$ Release all non-public memvars
  816. * ==================================
  817. RELEASE ALL
  818. RELEASE lstext, lmtext
  819. RETURN TO MASTER
  820. * End procedure GO_MASTR
  821.  
  822.  
  823.  
  824. *!*********************************************************************
  825. *!
  826. *!      Procedure: SETENVMT
  827. *!
  828. *!      Called by: PRO2EROR.PRG                      
  829. *!               : GO_MASTR           (procedure in PRO2EROR.PRG)
  830. *!
  831. *!*********************************************************************
  832. PROCEDURE setenvmt
  833. ***********************************************************************
  834. *& Change full range of environmentals
  835. *  in anticipation of a RETURN TO MASTER
  836. *
  837. *   Author: Pat Adams  (718) 469-4032
  838. *   Date: 7/24/91
  839. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  840. PRIVATE disk_space
  841. STORE DISKSPACE() TO disk_space
  842. SET CONSOLE OFF
  843. * =====================================
  844. * Create a program tree 20 levels deep
  845. * =====================================
  846. FOR XX = 1 TO 20
  847.     nextlevl = "PROGTREE" + ALLTRIM(TRANSFORM(xx, "@Z 99"))
  848.     STORE SYS(16, xx) TO &nextlevl
  849.  
  850.     IF EMPTY(SYS(16,xx))
  851.         EXIT
  852.     ENDIF
  853. ENDFOR
  854.  
  855. PUBLIC lstext, lmtext
  856. STORE SYS(3) + ".TXT" TO lstext
  857. LIST STATUS TO (lstext)
  858. * ==================================================
  859. *$ Create files which hold information from LIST STATUS
  860. *$ and LIST MEMORY prior to closing files, etc.
  861. * ==================================================
  862. STORE SYS(3) + ".TXT" TO lmtext
  863. LIST MEMORY TO (lmtext)
  864. SET CONSOLE ON
  865. * =================================================
  866. * Re-initalize environment for defaults prior to
  867. * commencing any of the following activities
  868. * =================================================
  869. ON KEY          && Null out hot keys
  870. CLEAR GETS
  871. CLEAR READ ALL
  872. CLEAR FIELDS
  873. CLEAR MACROS
  874. CLEAR WINDOWS
  875. DEACTIVATE MENUS
  876. CLEAR MENUS
  877. DEACTIVATE POPUPS
  878. CLEAR POPUPS
  879. CLEAR PROMPT
  880. UNLOCK ALL
  881. SET DEVICE TO SCREEN
  882. CLOSE DATA
  883. SET TALK OFF
  884. SET ESCAPE OFF
  885. SET CURSOR OFF
  886. RETURN
  887. * End procedure SETENVMT
  888.  
  889.  
  890. *!*********************************************************************
  891. *!
  892. *!      Procedure: SAVE_IT
  893. *!
  894. *!      Called by: PRO2EROR.PRG                      
  895. *!               : GO_MASTR           (procedure in PRO2EROR.PRG)
  896. *!
  897. *!          Calls: LOGVIEW            (procedure in PRO2EROR.PRG)
  898. *!
  899. *!           Uses: PRO2EROR.DBF       
  900. *!
  901. *!*********************************************************************
  902. PROCEDURE save_it
  903. ***********************************************************************
  904. *& Store error info to PRO2EROR database
  905. *
  906. *   Author: Pat Adams  (718) 469-4032
  907. *   Date: 7/29/91
  908. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  909. DEFINE WINDOW moment FROM 12,29 TO 14,51 "▒","▒","▒", ;
  910.     "▒","▒","▒","▒","▒" COLOR W+*/R,N/W,W+*/R SHADOW
  911. ACTIVATE SCREEN
  912. ACTIVATE WINDOW moment
  913. @ 0, 0 SAY REPLICATE("▒",21)
  914. @ 0, 2 SAY "ONE MOMENT PLEASE"
  915. * ==============================================
  916. * NOTE: In a single user system running on a 386
  917. * machine this window may flash by so rapidly that
  918. * it can be omitted.
  919. * ==============================================
  920. IF NETWORK()
  921.     * ==============================================
  922.     * If running under FoxPro LAN the assumption is
  923.     * that a LAN is in use.  Get LAN user log-in name.
  924.     * ==============================================
  925.     PRIVATE uname
  926.     STORE GETENV("USER") TO uname
  927. ENDIF (NETWORK())
  928. * ==========================
  929. *$ Store info to error file
  930. * ==========================
  931. SET CONSOLE OFF
  932. USE pro2eror
  933. APPEND BLANK
  934. replace er_no WITH xerno, er_msg WITH xmsg, ;
  935.     kode WITH xkode, mmodul WITH xmodul, ddate ;
  936.     WITH DATE(), ttime WITH TIME(), line_no WITH xline
  937.  
  938. IF TYPE("UNAME") <> "U" .AND. ! EMPTY(uname)
  939.     replace lan_user WITH uname
  940. ELSE
  941.     replace lan_user WITH "NOT AVAILABL"
  942. ENDIF (TYPE("UNAME") <> "U" .AND. ! EMPTY(uname))
  943. * ==================================================
  944. *$ Put info from the files created with LIST MEMORY
  945. *$ and LIST STATUS into the memo field and then
  946. *$ erase the text files
  947. * ==================================================
  948. APPEND MEMO notes FROM (lstext)
  949. ERASE (lstext)
  950. APPEND MEMO notes FROM (lmtext)
  951.  
  952. IF TYPE("TESTING") <> "U"
  953.     * =================================================
  954.     *$ If memvar TESTING has been initalized at a higher
  955.     *$ level provide developer/programmer with option to
  956.     *$ view error log file now
  957.     * =================================================
  958.     IF testing
  959.         DO logview
  960.     ENDIF (testing)
  961. ENDIF (TYPE("TESTING") <> "U")
  962.  
  963. CLOSE DATA
  964. ERASE (lmtext)
  965. RELEASE WINDOW moment
  966. RELEASE lstext, lmtext
  967. RETURN
  968. * End procedure save_it
  969.  
  970.  
  971.  
  972. *!*********************************************************************
  973. *!
  974. *!      Procedure: NO_FILE
  975. *!
  976. *!      Called by: PRO2EROR.PRG                      
  977. *!
  978. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  979. *!
  980. *!           Uses: CALLWHOM.DBF       
  981. *!
  982. *!*********************************************************************
  983. PROCEDURE no_file
  984. ***********************************************************************
  985. *& Error #1 - File does not exist or can not be found
  986. *& Error #802 - SQL database file can not be found
  987. *& Error #1162 - PROCEDURE can not be found
  988. *
  989. *    The passed parameter is the name of the missing item
  990. *
  991. *   Author: Pat Adams  (718) 469-4032
  992. *   Date: 8/4/91
  993. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  994. PARAMETERS not_there
  995. not_there = UPPER(ALLTRIM(not_there))
  996. DEFINE WINDOW bugbox FROM 5,19 TO 17,61 DOUBLE ;
  997.     COLOR W+/N,N/W,W+*/R SHADOW
  998. ACTIVATE SCREEN
  999. @ 0,11 SAY "   BAD NEWS   " COLOR +*W/N
  1000. * ============================================
  1001. * Open CALLWHOM.DBF to get info on appropriate
  1002. * person who should be in formed of problem.
  1003. * If application is single-user substitute info
  1004. * in the APP ADMINISTRATOR record rather than
  1005. * using the LAN ADMINISTRATOR data
  1006. * ===========================================
  1007. SELECT 0
  1008. USE callwhom
  1009. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  1010. STORE ALLTRIM(callwhom->call_who) TO m_call
  1011. STORE ALLTRIM(callwhom->other) TO m_title
  1012. STORE ALLTRIM(callwhom->phone) TO m_phone
  1013. CLOSE DATA
  1014. @ 2, 5 SAY "The following file is missing:"
  1015. @ 3, 0 SAY PADC(not_there,40)
  1016. @ 4,13 SAY "Please contact:"
  1017. @ 5, 0 SAY PADC(m_call,40)
  1018. @ 6, 0 SAY PADC(m_title,40)
  1019. @ 7, 0 SAY PADC(m_phone,40)
  1020. @ 8, 9 SAY "to report this problem."
  1021. @ 10, 1 SAY "Press any key to return to main menu..." COLOR W/N
  1022. DO razberry                    && Sound Bronx cheer
  1023. = INKEY(0, "MH")               && Wait for keypress or mouse click
  1024. RELEASE WINDOW bugbox
  1025. RETURN
  1026. * End procedure NO_FILE
  1027.  
  1028.  
  1029. *!*********************************************************************
  1030. *!
  1031. *!      Procedure: RAZBERRY
  1032. *!
  1033. *!      Called by: NO_FILE            (procedure in PRO2EROR.PRG)
  1034. *!               : TOO_HIGH           (procedure in PRO2EROR.PRG)
  1035. *!               : LOWFILES           (procedure in PRO2EROR.PRG)
  1036. *!               : INDEX_ER           (procedure in PRO2EROR.PRG)
  1037. *!               : NOMEMO             (procedure in PRO2EROR.PRG)
  1038. *!               : LOWMEMRY           (procedure in PRO2EROR.PRG)
  1039. *!               : BAD_RPT            (procedure in PRO2EROR.PRG)
  1040. *!               : BADMEMFL           (procedure in PRO2EROR.PRG)
  1041. *!               : NOSPACE            (procedure in PRO2EROR.PRG)
  1042. *!               : KORRUPT            (procedure in PRO2EROR.PRG)
  1043. *!               : READONLY           (procedure in PRO2EROR.PRG)
  1044. *!               : BAD_DIF            (procedure in PRO2EROR.PRG)
  1045. *!               : BAD_SYLK           (procedure in PRO2EROR.PRG)
  1046. *!               : NOTRIGHT           (procedure in PRO2EROR.PRG)
  1047. *!               : BADLOTUS           (procedure in PRO2EROR.PRG)
  1048. *!               : INVALPRN           (procedure in PRO2EROR.PRG)
  1049. *!               : NOTREADY           (procedure in PRO2EROR.PRG)
  1050. *!               : SQL_INTL           (procedure in PRO2EROR.PRG)
  1051. *!               : SQLTRASH           (procedure in PRO2EROR.PRG)
  1052. *!               : NOSQLIDX           (procedure in PRO2EROR.PRG)
  1053. *!               : SQL_IDX            (procedure in PRO2EROR.PRG)
  1054. *!               : SQLABORT           (procedure in PRO2EROR.PRG)
  1055. *!               : BADCHAIN           (procedure in PRO2EROR.PRG)
  1056. *!               : NOCREAT            (procedure in PRO2EROR.PRG)
  1057. *!               : READ_ERR           (procedure in PRO2EROR.PRG)
  1058. *!               : RITE_ERR           (procedure in PRO2EROR.PRG)
  1059. *!               : BADCLOSE           (procedure in PRO2EROR.PRG)
  1060. *!               : VERBOSE            (procedure in PRO2EROR.PRG)
  1061. *!               : NORUN              (procedure in PRO2EROR.PRG)
  1062. *!               : PKORRUPT           (procedure in PRO2EROR.PRG)
  1063. *!               : BADEXCEL           (procedure in PRO2EROR.PRG)
  1064. *!               : BADSYMPH           (procedure in PRO2EROR.PRG)
  1065. *!               : NOACCESS           (procedure in PRO2EROR.PRG)
  1066. *!               : NO_CDX             (procedure in PRO2EROR.PRG)
  1067. *!               : PROGBUG            (procedure in PRO2EROR.PRG)
  1068. *!
  1069. *!*********************************************************************
  1070. PROCEDURE razberry
  1071. ***********************************************************************
  1072. *& Sound bell as a "raspberry" or Bronx Cheer
  1073. *
  1074. *    Author: Pat Adams, DB Unlimited
  1075. *   Date: 7/24/89
  1076. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1077. SET BELL TO 20,15
  1078. ?? CHR(7)
  1079. SET BELL TO
  1080. * End Procedure Razberry
  1081.  
  1082.  
  1083. *!*********************************************************************
  1084. *!
  1085. *!      Procedure: LOGVIEW
  1086. *!
  1087. *!      Called by: SAVE_IT            (procedure in PRO2EROR.PRG)
  1088. *!
  1089. *!          Calls: YES_NO             (procedure in PRO2EROR.PRG)
  1090. *!               : MEMOVIEW           (procedure in PRO2EROR.PRG)
  1091. *!               : QQUIT              (procedure in PRO2EROR.PRG)
  1092. *!               : KANCEL             (procedure in PRO2EROR.PRG)
  1093. *!
  1094. *!*********************************************************************
  1095. PROCEDURE logview
  1096. ***********************************************************************
  1097. *& View error log if user so requests
  1098. *
  1099. *   Author: Pat Adams  (718) 469-4032
  1100. *   Date: 8/2/91
  1101. *
  1102. *   Modified 8/16/91 by Pat Adams
  1103. *     F2 KEY LABEL setting stored & then reinitalized
  1104. *     to original setting
  1105. *
  1106. *   Modified by Pat Adams 8/19/91
  1107. *     Existing ON KEY LABELs changed to SHIFT-Fx
  1108. *     to avoid conflicts with more commonly used
  1109. *     function keys.
  1110. *
  1111. *   Modified by Pat Adams 8/22/91
  1112. *      Use of ESC key to return to command window
  1113. *      if in interactive version of FoxPro 2.0 added
  1114. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1115. PRIVATE do_it, scheme10, curs_set, sf2key, sf9key, cqkey, ;
  1116.     esckey, escstat, ttitle, clockset
  1117. STORE .F. TO do_it
  1118. RELEASE WINDOW moment
  1119. DEFINE WINDOW question FROM 12,12 TO 14,68 DOUBLE ;
  1120.     COLOR N/W,N/W,R+/W SHADOW
  1121. ACTIVATE SCREEN
  1122. ACTIVATE WINDOW question
  1123. @ 0, 1 SAY "Would you like to view the error " + ;
  1124.     "log file now?  (Y/N)"
  1125. DO yes_no WITH do_it
  1126. RELEASE WINDOW question
  1127.  
  1128. IF do_it
  1129.     STORE SCHEME(10) TO scheme10
  1130.     SET COLOR OF SCHEME 10 TO +W/N, N/W, +W/+R, R/W, R/W, N/W, N/W
  1131.     STORE SET("CURSOR") TO curs_set
  1132.     SET CURSOR ON
  1133.     * ==========================================
  1134.     *$ Store any ON KEY LABEL SHIFT-F2 setting
  1135.     *  and initalize for exit of BROWSE/MEMO
  1136.     * ==========================================
  1137.     STORE ON("KEY", "SHIFT-F2") TO sf2key
  1138.     ON KEY LABEL shift-F2 KEYBOARD CHR(23)        && Exit from BROWSE
  1139.     * ==========================================
  1140.     *$ Store any ON KEY LABEL SHIFT-F9 setting
  1141.     *  and initalize for exit of BROWSE/MEMO
  1142.     * ==========================================
  1143.     STORE ON("KEY", "SHIFT-F9") TO sf9key
  1144.     ON KEY LABEL shift-F9 DO memoview    && Open window & view memo field
  1145.     * ===========================================
  1146.     *$ Store any ON KEY LABEL CTRL-Q TO cqkey
  1147.     *  and initalize for return to DOS
  1148.     * ===========================================
  1149.     STORE ON("KEY", "CTRL-Q") TO cqkey
  1150.     ON KEY LABEL ctrl-q DO qquit
  1151.     ttitle = IIF("EXE" $ VERS(1), "", " ESC for " + ;
  1152.         "COMMAND WIN, ") + "STATS=SHIFT-F9, " + ;
  1153.         "EXIT=SHIFT-F2, CTRL-Q=EXIT TO DOS"
  1154.     DEFINE WINDOW browin FROM 0,0 TO 24,79 DOUBLE ;
  1155.         COLOR W+/N,N/W, W+/R, R/W, R/W, N/W, N/W ;
  1156.         TITLE ' &ttitle '
  1157.     DEFINE WINDOW memwin FROM 7,0 TO 21,79 DOUBLE ;
  1158.         COLOR W+/N,N/W,R+/N,R+/N,R+/N, N/W,N/W ;
  1159.         TITLE ' PRESS SHIFT-F2 TO EXIT '
  1160.     STORE SET("CLOCK") TO clockset
  1161.     SET CLOCK OFF
  1162.     
  1163.     IF ! "EXE" $ VERS(1)
  1164.         * ===============================================
  1165.         *$ If working in interactive development version
  1166.         *$ provide opportunity to press ESC to return to
  1167.         *$ command window
  1168.         * ===============================================
  1169.         STORE ON("KEY", "ESC") TO esckey
  1170.         STORE SET("ESCAPE") TO escstat
  1171.         SET ESCAPE ON
  1172.         ON KEY LABEL esc DO kancel
  1173.     ENDIF (! "EXE" $ VERS(1))
  1174.     
  1175.     
  1176.     IF NETWORK()
  1177.         SET REFRESH TO 200
  1178.     ENDIF (NETWORK())
  1179.     
  1180.     BROWSE NOMODIFY WINDOW browin
  1181.     * =========================================
  1182.     *$ Restore previous ON KEY LABEL settings
  1183.     * =========================================
  1184.     ON KEY LABEL F2 &sf2key
  1185.     ON KEY LABEL F9 &sf9key
  1186.     ON KEY LABEL ctrl-q &cqkey
  1187.     SET CLOCK &ckockset
  1188.     
  1189.     IF ! "EXE" $ VERS(1)
  1190.         ON KEY LABEL esc &esckey
  1191.         SET ESCAPE &escstat
  1192.     ENDIF (! "EXE" $ VERS(1))
  1193.     
  1194.     IF NETWORK()
  1195.         SET REFRESH TO 0
  1196.     ENDIF (NETWORK())
  1197.     
  1198.     CLEAR WINDOWS
  1199.     SET STATUS OFF
  1200.     SET COLOR OF SCHEME 10 TO &scheme10
  1201.     SET CURSOR &curs_set
  1202. ENDIF (do_it)
  1203.  
  1204. RETURN
  1205. * End procedure LOGVIEW
  1206.  
  1207.  
  1208. *!*********************************************************************
  1209. *!
  1210. *!      Procedure: MEMOVIEW
  1211. *!
  1212. *!      Called by: LOGVIEW            (procedure in PRO2EROR.PRG)
  1213. *!               : MEMOVIEW           (procedure in PRO2EROR.PRG)
  1214. *!
  1215. *!          Calls: MEMOVIEW           (procedure in PRO2EROR.PRG)
  1216. *!
  1217. *!*********************************************************************
  1218. PROCEDURE memoview
  1219. ***********************************************************************
  1220. *& Open large window to view memo field info in error log
  1221. *
  1222. *  Routine assumes the F2 key has been enabled at a higher
  1223. *  level to exit the window and that window MEMWIN has been
  1224. *  defined at a higher level.
  1225. *
  1226. *   Author: Pat Adams  (718) 469-4032
  1227. *   Date: 8/2/91
  1228. *
  1229. *   Modified 8/19/91 by Pat Adams
  1230. *       Changes made to reflect modified ON KEY LABEL usage
  1231. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1232. ON KEY LABEL shift-F9
  1233. SET WINDOW OF MEMO TO memwin
  1234. MODIFY MEMO notes NOEDIT
  1235. CLOSE MEMO notes
  1236. DEACTIVATE WINDOW memwin
  1237. ON KEY LABEL shift-F9 DO memoview
  1238. RETURN
  1239. * End procedure MEMOVIEW
  1240.  
  1241.  
  1242.  
  1243. *!*********************************************************************
  1244. *!
  1245. *!      Procedure: YES_NO
  1246. *!
  1247. *!      Called by: FILE_BUSY          (procedure in PRO2EROR.PRG)
  1248. *!               : NOSPACE            (procedure in PRO2EROR.PRG)
  1249. *!               : REC_BUSY           (procedure in PRO2EROR.PRG)
  1250. *!               : NOTREADY           (procedure in PRO2EROR.PRG)
  1251. *!               : SQL_IDX            (procedure in PRO2EROR.PRG)
  1252. *!               : SQLABORT           (procedure in PRO2EROR.PRG)
  1253. *!               : READ_ERR           (procedure in PRO2EROR.PRG)
  1254. *!               : RITE_ERR           (procedure in PRO2EROR.PRG)
  1255. *!               : BADCLOSE           (procedure in PRO2EROR.PRG)
  1256. *!               : VERBOSE            (procedure in PRO2EROR.PRG)
  1257. *!               : LOGVIEW            (procedure in PRO2EROR.PRG)
  1258. *!
  1259. *!*********************************************************************
  1260. PROCEDURE yes_no
  1261. ***********************************************************************
  1262. *& Get user response of Y or N and return
  1263. *
  1264. *   Passed parameter is a logical .T. or .F. and
  1265. *   is returned as a logical value.  This methodology
  1266. *   is utilized rather than a GET on a memvar or a lite
  1267. *   bar menu in order to avoid potential conflicts with
  1268. *   color settings and schemes.
  1269. *
  1270. *   Mouse response is not permitted.  User MUST
  1271. *   respond with a Y or N.
  1272. *
  1273. *   Author: Pat Adams  (718) 469-4032
  1274. *   Date: 5/2/89
  1275. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1276. PARAMETERS answer
  1277. PRIVATE kkey, curs_set
  1278. STORE 0 TO kkey
  1279. STORE SET("CURSOR") TO curs_set
  1280. SET CURSOR OFF
  1281.  
  1282. DO WHILE kkey = 0
  1283.     kkey = INKEY()
  1284.     
  1285.     IF kkey > 0
  1286.         * =============================
  1287.         * Function keys 2 thru 9 return
  1288.         * negative values.  This sets up
  1289.         * error trapping for that condition.
  1290.         * =============================
  1291.         IF CHR(kkey) $ "YyNn"
  1292.             IF CHR(kkey) $ "Yy"
  1293.                 STORE .T. TO answer
  1294.             ELSE
  1295.                 STORE .F. TO answer
  1296.             ENDIF (CHR(kkey) $ "Yy")
  1297.         ELSE
  1298.             STORE 0 TO kkey
  1299.         ENDIF (CHR(kkey) $ "YyNn")
  1300.     ELSE
  1301.         STORE 0 TO kkey
  1302.     ENDIF (kkey > 0)
  1303. ENDDO (kkey = 0)
  1304.  
  1305. * ================================
  1306. * Restore cursor to original status
  1307. * ================================
  1308. SET CURSOR &curs_set)
  1309. RETURN answer
  1310. * End procedure YES_NO
  1311.  
  1312.  
  1313.  
  1314. *!*********************************************************************
  1315. *!
  1316. *!      Procedure: FILE_BUSY
  1317. *!
  1318. *!      Called by: PRO2EROR.PRG                      
  1319. *!
  1320. *!          Calls: NICECHIM           (procedure in PRO2EROR.PRG)
  1321. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  1322. *!
  1323. *!*********************************************************************
  1324. PROCEDURE file_busy
  1325. ***********************************************************************
  1326. *$ Display window informing user required file is busy
  1327. *
  1328. *   Author: Pat Adams  (718) 469-4032
  1329. *   Date: 7/31/91
  1330. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1331. PARAMETERS re_try
  1332. DEFINE WINDOW busy FROM 8, 8 TO 15,72 DOUBLE ;
  1333.     COLOR N/W,N/W,R+*/W SHADOW
  1334. ACTIVATE SCREEN
  1335. ACTIVATE WINDOW busy
  1336. @ 0,22 SAY "   S O R R Y   " COLOR *+R/W
  1337. @ 2, 1 SAY "Someone else was using the file required " + ;
  1338.     "at this point."
  1339. @ 3, 1 SAY "Attempting a 'retry' may find that " + ;
  1340.     "the file is now available."
  1341. @ 5, 6 SAY "Would you like to retry for use " + ;
  1342.     "of the file?  (Y/N)"
  1343. DO nicechim
  1344. DO yes_no WITH re_try
  1345. RELEASE WINDOW busy
  1346. RETURN re_try
  1347. * End procedure FILE_BUSY
  1348.  
  1349.  
  1350.  
  1351. *!*********************************************************************
  1352. *!
  1353. *!      Procedure: GO_AGAIN
  1354. *!
  1355. *!      Called by: PRO2EROR.PRG                      
  1356. *!
  1357. *!          Calls: ERORSET            (procedure in PRO2EROR.PRG)
  1358. *!
  1359. *!    Other Files: &PRNT_DEVIC
  1360. *!
  1361. *!*********************************************************************
  1362. PROCEDURE go_again
  1363. ***********************************************************************
  1364. *& Reset environment for RETRY
  1365. *
  1366. *   Author: Pat Adams  (718) 469-4032
  1367. *   Date: 8/3/91
  1368. *
  1369. *   Modified 8/19/91 by Pat Adams
  1370. *       Selection of CURR_DBF added before
  1371. *       execution of the RETRY upon return
  1372. *       to calling module.  Closure of PRO2EROR
  1373. *       database added in the event it was used
  1374. *       since some module which do a RETRY also
  1375. *       save data into the error log.
  1376. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1377. IF USED("CALLWHOM")
  1378.     SELECT callwhom
  1379.     USE
  1380. ENDIF (USED("CALLWHOM"))
  1381.  
  1382. IF USED("PRO2EROR")
  1383.     SELECT pro2eror
  1384.     USE
  1385. ENDIF (USED("PRO2EROR"))
  1386.  
  1387. SELECT curr_dbf
  1388.  
  1389. IF ! EMPTY(top_win)
  1390.     * ===================================
  1391.     * Note that EVALUATE() does not work
  1392.     * with ACTIVATE WINDOW so ¯o is used
  1393.     * ===================================
  1394.     ACTIVATE WINDOW &top_win
  1395. ENDIF (! EMPTY(top_win))
  1396.  
  1397. SET CONSOLE &xkonsol
  1398. SET DEVICE TO &xdevice
  1399. SET PRINTER TO &prnt_devic
  1400. SET PRINT &xprint
  1401.  
  1402. IF ! EMPTY(curr_dbf)
  1403.     SELECT (curr_dbf)
  1404. ENDIF (! EMPTY(curr_dbf))
  1405.  
  1406. RELEASE lstext, lmtext
  1407. DO erorset
  1408. RETURN
  1409. * End procedure GO_AGAIN
  1410.  
  1411.  
  1412.  
  1413. *!*********************************************************************
  1414. *!
  1415. *!      Procedure: ERORSET
  1416. *!
  1417. *!      Called by: PRO2EROR.PRG                      
  1418. *!               : GO_MASTR           (procedure in PRO2EROR.PRG)
  1419. *!               : GO_AGAIN           (procedure in PRO2EROR.PRG)
  1420. *!
  1421. *!          Calls: PRO2EROR.PRG
  1422. *!
  1423. *!*********************************************************************
  1424. PROCEDURE erorset
  1425. ***********************************************************************
  1426. *& Reinitalize error set statement for PRO2EROR
  1427. *
  1428. *   Author: Pat Adams  (718) 469-4032
  1429. *   Date: 7/12/91
  1430. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1431. ON ERROR DO pro2eror WITH ERROR(), MESSAGE(), ;
  1432.     MESSAGE(1), SYS(16), LINENO(), SYS(102), ;
  1433.     SYS(100), SYS(101), LASTKEY(), DBF(), ;
  1434.     SYS(18), SYS(5), SYS(12), SYS(6), SYS(2003), ;
  1435.     WONTOP(), SYS(2011), SYS(2018)
  1436. RELEASE lstext, lmtext
  1437. RETURN
  1438. * End procedure ERORSET
  1439.  
  1440.  
  1441. *!*********************************************************************
  1442. *!
  1443. *!      Procedure: NICECHIM
  1444. *!
  1445. *!      Called by: FILE_BUSY          (procedure in PRO2EROR.PRG)
  1446. *!               : REC_BUSY           (procedure in PRO2EROR.PRG)
  1447. *!
  1448. *!*********************************************************************
  1449. PROCEDURE nicechim
  1450. ***********************************************************************
  1451. * & Sound pleasant 3 part chime
  1452. *
  1453. *    Author: Pat Adams, DB Unlimited
  1454. *   Date: 7/24/89
  1455. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1456. SET BELL TO 2000,5
  1457. ?? CHR(7)
  1458. SET BELL TO 2500,5
  1459. ?? CHR(7)
  1460. SET BELL TO 3000,5
  1461. ?? CHR(7)
  1462. SET BELL TO           && Return bell to normal setting
  1463. RETURN
  1464. * End Procedure NICECHIM
  1465.  
  1466.  
  1467.  
  1468. *!*********************************************************************
  1469. *!
  1470. *!      Procedure: QQUIT
  1471. *!
  1472. *!      Called by: PRO2EROR.PRG                      
  1473. *!               : LOGVIEW            (procedure in PRO2EROR.PRG)
  1474. *!
  1475. *!*********************************************************************
  1476. PROCEDURE qquit
  1477. ***********************************************************************
  1478. *& Return user to DOS
  1479. *
  1480. *   Author: Pat Adams  (718) 469-4032
  1481. *   Date: 7/7/91
  1482. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1483. CLOSE DATA
  1484. SET CURSOR ON
  1485. SET COLOR TO W/N
  1486. CLEAR
  1487. SET CLEAR OFF          && Suppresses "Normal Shutdown" message
  1488. QUIT
  1489. * End procedure QQUIT
  1490.  
  1491.  
  1492.  
  1493. *!*********************************************************************
  1494. *!
  1495. *!      Procedure: NOACCESS
  1496. *!
  1497. *!      Called by: PRO2EROR.PRG                      
  1498. *!
  1499. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1500. *!
  1501. *!           Uses: CALLWHOM.DBF       
  1502. *!
  1503. *!*********************************************************************
  1504. PROCEDURE noaccess
  1505. ***********************************************************************
  1506. *$ File access denied
  1507. *
  1508. *  Attempt has been made to write to a file that is
  1509. *  read only.  This may arise for several reasons:
  1510. *
  1511. *     1.  File is protected by the DOS
  1512. *        ATTRIB command as read only
  1513. *
  1514. *    2.  User rights have not been
  1515. *        configured properly for this
  1516. *        users LAN access.  Note that
  1517. *        a .DBF file may be opened  (for purposes
  1518. *        of reading or copying the file) with
  1519. *        read only rights on a LAN but
  1520. *        index files require both read and
  1521. *        write rights.
  1522. *
  1523. *    3.  Most LANs, such as Novell, utilize bytes not utilized
  1524. *        by DOS to store information about whether the LAN
  1525. *        attribute(s) for the file are read only, etc.  Something,
  1526. *        including Novell add-on utilities and menus, may
  1527. *        have changed the LAN attributes for this file to
  1528. *        read only.
  1529. *
  1530. *    4.  File is in exclusive use by another.  Error #3 should
  1531. *        be returned in this circumstance but certain versions
  1532. *        of DOS based LANs such as InvisibleNet erroneously
  1533. *        return error 1705.  If you are using a DOS based LAN
  1534. *        and get frequent recurrence of error # 1705 and you
  1535. *        are sure users have the correct LAN rights this may
  1536. *        be the culprit.
  1537. *
  1538. *   5.   Error # 823 is generated when a SQL open of a
  1539. *        specified file fails.
  1540. *
  1541. *   Author: Pat Adams, DB Unlimited
  1542. *   Date: 8/5/91
  1543. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1544. ACTIVATE SCREEN
  1545. DEFINE WINDOW bugbox FROM 3,18 TO 19,61 DOUBLE ;
  1546.     COLOR N/W,N/W,R+*/W SHADOW
  1547. ACTIVATE WINDOW bugbox
  1548. @ 0,10 SAY "   W H O O P S   " COLOR *+R/W
  1549. @ 2, 1 SAY "One of two problems has occurred. Either"
  1550. @ 3, 1 SAY "you do not have the appropriate user"
  1551. @ 4, 1 SAY "rights on the LAN or the file you need"
  1552. @ 5, 1 SAY "has inadvertently been flagged as read"
  1553. @ 6, 1 SAY "only."
  1554. SELECT 0
  1555. USE callwhom
  1556. * ========================================
  1557. *$ Get info on appropriate person to call
  1558. * ========================================
  1559. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  1560. STORE ALLTRIM(callwhom->call_who) TO m_call
  1561. STORE ALLTRIM(callwhom->other) TO m_title
  1562. STORE ALLTRIM(callwhom->phone) TO m_phone
  1563. CLOSE DATA
  1564. @ 8,14 SAY "Please call "
  1565. @ 9,0 SAY PADC(m->m_call, 42)
  1566. @ 10,0 SAY PADC(m->m_title, 42)
  1567. @ 11,0 SAY PADC(m->m_phone, 42)
  1568. @ 12,10 SAY "to report the problem."
  1569. DO razberry
  1570. @14,1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  1571. = INKEY(0, "MH")
  1572. RELEASE WINDOW bugbox
  1573. RETURN
  1574. *End procedure NOACCESS
  1575.  
  1576.  
  1577.  
  1578. *!*********************************************************************
  1579. *!
  1580. *!      Procedure: REC_BUSY
  1581. *!
  1582. *!      Called by: PRO2EROR.PRG                      
  1583. *!
  1584. *!          Calls: NICECHIM           (procedure in PRO2EROR.PRG)
  1585. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  1586. *!
  1587. *!*********************************************************************
  1588. PROCEDURE rec_busy
  1589. ***********************************************************************
  1590. *& Display window informing user record is locked by another
  1591. *
  1592. *   Author: Pat Adams  (718) 469-4032
  1593. *   Date: 8/1//91
  1594. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1595. PARAMETERS re_try
  1596. DEFINE WINDOW busy FROM 7,18 TO 14,61 DOUBLE ;
  1597.     COLOR N/W,N/W,R+*/W SHADOW
  1598. ACTIVATE SCREEN
  1599. ACTIVATE WINDOW busy
  1600. @ 0,12 SAY "   S O R R Y   " COLOR *+R/W
  1601. @ 2, 1 SAY "Someone else locked the record you need."
  1602. @ 3, 1 SAY "If you try again it may now be available."
  1603. @ 5, 6 SAY "WOULD YOU LIKE TO RETRY?  (Y/N)"
  1604. DO nicechim
  1605. DO yes_no WITH re_try
  1606. RELEASE WINDOW busy
  1607. RETURN re_try
  1608. * End procedure REC_BUSY
  1609.  
  1610.  
  1611.  
  1612. *!*********************************************************************
  1613. *!
  1614. *!      Procedure: TOO_HIGH
  1615. *!
  1616. *!      Called by: PRO2EROR.PRG                      
  1617. *!
  1618. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1619. *!
  1620. *!           Uses: CALLWHOM.DBF       
  1621. *!
  1622. *!*********************************************************************
  1623. PROCEDURE too_high
  1624. ***********************************************************************
  1625. *& Error #5, "Record is out of range"
  1626. *
  1627. *   This error usually arises from the following conditions:
  1628. *
  1629. *     1.  Attempts to access a record number greater than
  1630. *         the actual number of records in the database.
  1631. *
  1632. *     2.  FoxPro has been installed with the demonstration
  1633. *         key instead of the activation key and the database
  1634. *         contains more records than permitted in the demo.
  1635. *
  1636. *     3.  An index is out of date and no longer matches
  1637. *         the database in use.
  1638. *
  1639. *   Inform user and have them call Application Administrator.
  1640. *
  1641. *   Author: Pat Adams  (718) 469-4032
  1642. *   Date: 8/6//91
  1643. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1644. DEFINE WINDOW bugbox FROM 2,16 TO 21,64 DOUBLE ;
  1645.     COLOR N/W,N/W,R+*/W SHADOW
  1646. ACTIVATE SCREEN
  1647. ACTIVATE WINDOW bugbox
  1648. @ 0,12 SAY "    W H O O P S   " COLOR *+R/W
  1649. @ 2, 2 SAY "One of the following problems has occurred:"
  1650. @ 4, 2 SAY "1.  The demo version of this product is in"
  1651. @ 5, 6 SAY "use and an attempt has been made to use"
  1652. @ 6, 6 SAY "a database which contains more records"
  1653. @ 7, 6 SAY "than permitted by the demo."
  1654. @ 9, 2 SAY "2.  One of the indexes is out of date."
  1655. @11,18 SAY "Please call"
  1656. SELECT 0
  1657. USE callwhom
  1658. * ========================================
  1659. *$ Get info on appropriate person to call
  1660. * ========================================
  1661. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  1662. STORE ALLTRIM(callwhom->call_who) TO m_call
  1663. STORE ALLTRIM(callwhom->other) TO m_title
  1664. STORE ALLTRIM(callwhom->phone) TO m_phone
  1665. @12, 0 SAY PADC(m->m_call, 46)
  1666. @13, 0 SAY PADC(m->m_title, 46)
  1667. @14, 0 SAY PADC(m->m_phone, 46)
  1668. @15,12 SAY "to report this problem."
  1669. DO razberry
  1670. @17, 1 SAY "Press any key to return to Main Menu..."
  1671. = INKEY(0, "MH")
  1672. CLOSE DATA
  1673. RELEASE WINDOW bugbox
  1674. RETURN
  1675. * End procedure TOO_HIGH
  1676.  
  1677.  
  1678.  
  1679. *!*********************************************************************
  1680. *!
  1681. *!      Procedure: INDEX_ER
  1682. *!
  1683. *!      Called by: PRO2EROR.PRG                      
  1684. *!
  1685. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1686. *!
  1687. *!           Uses: CALLWHOM.DBF       
  1688. *!
  1689. *!*********************************************************************
  1690. PROCEDURE index_er
  1691. ***********************************************************************
  1692. *& Index error messages
  1693. *
  1694. *   Error #19 =   "Index file does not match database"  The
  1695. *                 most likely cause is that index uses fields not
  1696. *                 in the database or relies upon memvars which are
  1697. *                 not initialized.
  1698. *
  1699. *   Error #20 =   "Record is not in index"  Most likely cause is
  1700. *                 that the database structure was changed without
  1701. *                 the index being active.
  1702. *
  1703. *   Error #114 =  "Index does not match database file"  The most
  1704. *                 likely cause is corruption within the index file
  1705. *                 or in the index file header.  Do not REINDEX but,
  1706. *                 rather, recreate index with INDEX ON...TO
  1707. *
  1708. *   Since application is not usable until the index problems
  1709. *   have been corrected the user will be returned to DOS at the
  1710. *   calling level.
  1711. *
  1712. *   Author: Pat Adams  (718) 469-4032
  1713. *   Date: 8/7//91
  1714. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1715. DEFINE WINDOW bugbox FROM 5,17 TO 20,62 DOUBLE ;
  1716.     COLOR N/W,N/W,R+*/W SHADOW
  1717. ACTIVATE SCREEN
  1718. ACTIVATE WINDOW bugbox
  1719. @ 0,13 SAY "   BAD NEWS   " COLOR *+R/W
  1720. @ 2, 1 SAY "There is a problem with the index files"
  1721. @ 3, 1 SAY "which means they will need to be recreated."
  1722. @ 4, 1 SAY "You will not be able to use the system"
  1723. @ 5, 1 SAY "until this has been completed."
  1724. @ 7,15 SAY "Please contact"
  1725. SELECT 0
  1726. USE callwhom
  1727. * ========================================
  1728. *$ Get info on appropriate person to call
  1729. * ========================================
  1730. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  1731. STORE ALLTRIM(callwhom->call_who) TO m_call
  1732. STORE ALLTRIM(callwhom->other) TO m_title
  1733. STORE ALLTRIM(callwhom->phone) TO m_phone
  1734. @ 8, 0 SAY PADC(m->m_call, 44)
  1735. @ 9, 0 SAY PADC(m->m_title, 44)
  1736. @10, 0 SAY PADC(m->m_phone, 44)
  1737. @11,11 SAY "to report this problem."
  1738. @13, 1 SAY "Press any key to return to DOS..." COLOR +N/W
  1739. DO razberry
  1740. = INKEY(0, "MH")
  1741. RELEASE WINDOW bugbox
  1742. RETURN
  1743. * End procedure index_er
  1744.  
  1745.  
  1746.  
  1747. *!*********************************************************************
  1748. *!
  1749. *!      Procedure: NO_CDX
  1750. *!
  1751. *!      Called by: PRO2EROR.PRG                      
  1752. *!
  1753. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1754. *!
  1755. *!           Uses: CALLWHOM.DBF       
  1756. *!
  1757. *!*********************************************************************
  1758. PROCEDURE no_cdx
  1759. ***********************************************************************
  1760. *& Structural .CDX file not found - Error #1707
  1761. *
  1762. *   Since application is not usable until the .CDX
  1763. *   is recreated the user will be returned to DOS at the
  1764. *   calling level.
  1765. *
  1766. *   Author: Pat Adams  (718) 469-4032
  1767. *   Date: 8/7//91
  1768. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1769. DEFINE WINDOW bugbox FROM 5,17 TO 20,62 DOUBLE ;
  1770.     COLOR N/W,N/W,R+*/W SHADOW
  1771. ACTIVATE SCREEN
  1772. ACTIVATE WINDOW bugbox
  1773. @ 0,13 SAY "   BAD NEWS   " COLOR *+R/W
  1774. @ 2, 1 SAY "The structural index associated with the"
  1775. @ 3, 1 SAY "file you need seems to be missing.  You"
  1776. @ 4, 1 SAY "will not be able to use this system until"
  1777. @ 5, 1 SAY "the problem has been corrected."
  1778. @ 7,15 SAY "Please contact"
  1779. SELECT 0
  1780. USE callwhom
  1781. * ========================================
  1782. *$ Get info on appropriate person to call
  1783. * ========================================
  1784. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  1785. STORE ALLTRIM(callwhom->call_who) TO m_call
  1786. STORE ALLTRIM(callwhom->other) TO m_title
  1787. STORE ALLTRIM(callwhom->phone) TO m_phone
  1788. @ 8, 0 SAY PADC(m->m_call, 44)
  1789. @ 9, 0 SAY PADC(m->m_title, 44)
  1790. @10, 0 SAY PADC(m->m_phone, 44)
  1791. @11,11 SAY "to report this problem."
  1792. @13, 1 SAY "Press any key to return to DOS..." COLOR +N/W
  1793. DO razberry
  1794. = INKEY(0, "MH")
  1795. RELEASE WINDOW bugbox
  1796. RETURN
  1797. * End procedure NO_CDX
  1798.  
  1799.  
  1800.  
  1801. *!*********************************************************************
  1802. *!
  1803. *!      Procedure: READONLY
  1804. *!
  1805. *!      Called by: PRO2EROR.PRG                      
  1806. *!
  1807. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1808. *!
  1809. *!           Uses: CALLWHOM.DBF       
  1810. *!
  1811. *!*********************************************************************
  1812. PROCEDURE readonly
  1813. ***********************************************************************
  1814. *& Attempt was made to write to a read-only file - Error #111
  1815. *
  1816. *   The most likely cause of this is attempting to
  1817. *   write to a file created as read-only or accessed
  1818. *   as read-only under program control.  User is in-
  1819. *   structed to call the developer because it is probably
  1820. *   a programming error.
  1821. *
  1822. *   Author: Pat Adams  (718) 469-4032
  1823. *   Date: 8/7//91
  1824. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1825. DEFINE WINDOW bugbox FROM 4,18 TO 18,62 DOUBLE ;
  1826.     COLOR N/W,N/W,R+*/W SHADOW
  1827. ACTIVATE SCREEN
  1828. ACTIVATE WINDOW bugbox
  1829. @ 0,11 SAY "   W H O O P S  " *+R/W
  1830. @ 2, 1 SAY "There's a slight problem.  An attempt was"
  1831. @ 3, 1 SAY "made to write to a read-only file.  Your"
  1832. @ 4, 1 SAY "input can not be saved."
  1833. @ 6,14 SAY "Please contact"
  1834. SELECT 0
  1835. USE callwhom
  1836. * ========================================
  1837. *$ Get info on appropriate person to call
  1838. * ========================================
  1839. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  1840. STORE ALLTRIM(callwhom->call_who) TO m_call
  1841. STORE ALLTRIM(callwhom->other) TO m_title
  1842. STORE ALLTRIM(callwhom->phone) TO m_phone
  1843. @ 7, 0 SAY PADC(m->m_call, 42)
  1844. @ 8, 0 SAY PADC(m->m_title, 42)
  1845. @ 9, 0 SAY PADC(m->m_phone, 42)
  1846. @10, 4 SAY "immediately to report this problem."
  1847. @12, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  1848. DO razberry
  1849. = INKEY(0, "MH")
  1850. RELEASE WINDOW bugbox
  1851. RETURN
  1852. * End procedure READONLY
  1853.  
  1854.  
  1855.  
  1856. *!*********************************************************************
  1857. *!
  1858. *!      Procedure: PROGBUG
  1859. *!
  1860. *!      Called by: PRO2EROR.PRG                      
  1861. *!
  1862. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1863. *!
  1864. *!           Uses: CALLWHOM.DBF       
  1865. *!
  1866. *!*********************************************************************
  1867. PROCEDURE progbug
  1868. ***********************************************************************
  1869. *& Inform user a programming bug has occurred
  1870. *
  1871. *   Author: Pat Adams  (718) 469-4032
  1872. *   Date: 8/7//91
  1873. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1874. DEFINE WINDOW bugbox FROM 5,23 TO 19,56 DOUBLE ;
  1875.     COLOR N/W,N/W,R+*/W SHADOW
  1876. ACTIVATE SCREEN
  1877. ACTIVATE WINDOW bugbox
  1878. @ 0, 7 SAY "   BAD NEWS   " COLOR *+R/W
  1879. @ 2, 1 SAY "An error which is most likely"
  1880. @ 3, 1 SAY "a programming bug has occurred."
  1881. @ 5,11 SAY "Please call"
  1882. SELECT 0
  1883. USE callwhom
  1884. * ========================================
  1885. *$ Get info on appropriate person to call
  1886. * ========================================
  1887. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  1888. STORE ALLTRIM(callwhom->call_who) TO m_call
  1889. STORE ALLTRIM(callwhom->other) TO m_title
  1890. STORE ALLTRIM(callwhom->phone) TO m_phone
  1891. @ 6, 0 SAY PADC(m->m_call, 32)
  1892. @ 7, 0 SAY PADC(m_title, 32)
  1893. @ 8, 0 SAY PADC(m_phone, 32)
  1894. @ 9, 3 SAY "immediately to report this."
  1895. @11, 1 SAY "Press any key" COLOR +N/W
  1896. @12, 1 SAY "to return to Main Menu..." COLOR +N/W
  1897. DO razberry
  1898. = INKEY(0, "MH")
  1899. RELEASE WINDOW bugbox
  1900. RETURN
  1901. * End procedure PROGBUG
  1902.  
  1903.  
  1904.  
  1905. *!*********************************************************************
  1906. *!
  1907. *!      Procedure: NOCREAT
  1908. *!
  1909. *!      Called by: PRO2EROR.PRG                      
  1910. *!
  1911. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  1912. *!
  1913. *!           Uses: CALLWHOM.DBF       
  1914. *!
  1915. *!*********************************************************************
  1916. PROCEDURE nocreat
  1917. ***********************************************************************
  1918. *& Can not create file
  1919. *
  1920. *   Error #1102 = "Cannot create file" <file>
  1921. *                 Memvar XMISSING provides file name
  1922. *
  1923. *   Error #1157 = "Cannot update file"
  1924. *
  1925. *&  Error #1410 - Unable to create temporary work file(s)
  1926. *                 (i.e., files required for SORT, INDEX,
  1927. *                 REINDEX or PACK
  1928. *
  1929. *   The situation is usually caused by one of the following:
  1930. *
  1931. *   1.  Insufficient disk space or, on a LAN, insufficient
  1932. *       directory space
  1933. *
  1934. *   2.  Attempted use of an invalid file name, including use
  1935. *       of a file name which already exists
  1936. *
  1937. *   3.  User does not have the correct LAN authorization to
  1938. *       create a file
  1939. *
  1940. *   4.  A hardware error has caused an inability to write to
  1941. *       the hard disk.
  1942. *
  1943. *    Because of the circumstances which may have created the
  1944. *   error condition error information output will be sent to
  1945. *   the printer and the user returned to DOS upon return to
  1946. *   the calling module.
  1947. *
  1948. *   Author: Pat Adams  (718) 469-4032
  1949. *   Date: 8/8//91
  1950. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1951. DEFINE WINDOW bugbox FROM  3,4 TO 20,75 DOUBLE ;
  1952.     COLOR N/W,N/W,R+*/W SHADOW
  1953. ACTIVATE SCREEN
  1954. ACTIVATE WINDOW bugbox
  1955. @ 0,26 SAY "   BAD NEWS   " COLOR *+R/W
  1956. @ 2, 3 SAY "It's not possible to create a file which " + ;
  1957.     "is needed at this point."
  1958. @ 3, 3 SAY "This may be due to several problems, " + ;
  1959.     "one of which is insufficient"
  1960. @ 4, 3 SAY "disk space.  Because disk space may not " + ;
  1961.     "be available error infor-"
  1962. @ 5, 3 SAY "mation will be sent to the printer."
  1963. SELECT 0
  1964. USE callwhom
  1965. * ========================================
  1966. *$ Get info on appropriate person to call
  1967. * ========================================
  1968. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  1969. STORE ALLTRIM(callwhom->call_who) TO m_call
  1970. STORE ALLTRIM(callwhom->other) TO m_title
  1971. STORE ALLTRIM(callwhom->phone) TO m_phone
  1972. @ 7,28 SAY "Please contact"
  1973. @ 8, 0 SAY PADC(m->m_call, 70)
  1974. @ 9, 0 SAY PADC(m->m_title, 70)
  1975. @10, 0 SAY PADC(m->m_phone, 70)
  1976. @11, 6 SAY "to report this problem and provide " + ;
  1977.     "a copy of the printout."
  1978. @13, 1 SAY "Make sure your printer is turned on " + ;
  1979.     "and on-line and then press any"
  1980. @14, 1 SAY "key to begin printing the error " + ;
  1981.     "information.  You will be returned"
  1982. @15, 1 SAY "to DOS once the printing has been completed."
  1983. DO razberry
  1984. = INKEY(0, "MH")
  1985. CLOSE DATA
  1986. RELEASE WINDOW bugbox
  1987. RETURN
  1988. * End procedure norite
  1989.  
  1990.  
  1991. *!*********************************************************************
  1992. *!
  1993. *!      Procedure: TO_PRN
  1994. *!
  1995. *!      Called by: PRO2EROR.PRG                      
  1996. *!
  1997. *!*********************************************************************
  1998. PROCEDURE to_prn
  1999. ***********************************************************************
  2000. *& Send error info to printer
  2001. *
  2002. *   Author: Pat Adams  (718) 469-4032
  2003. *   Date: 8/8//91
  2004. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2005. SET CONSOLE OFF
  2006. LIST STATUS TO PRINT
  2007. LIST MEMORY TO PRINT
  2008. SET CONSOLE ON
  2009. RETURN
  2010. * End procedure TO_PRN
  2011.  
  2012.  
  2013. *!*********************************************************************
  2014. *!
  2015. *!      Procedure: BADRIGHTS
  2016. *!
  2017. *!      Called by: PRO2EROR.PRG                      
  2018. *!
  2019. *!*********************************************************************
  2020. PROCEDURE badrights
  2021. ***********************************************************************
  2022. *& Cannot open file - Error # 1101
  2023. *
  2024. *   Assuming the name of the file has been spelled correctly and
  2025. *   the correct subdirectory has been stated, if necessary, the
  2026. *   most likely cause of this error is the user not having
  2027. *   the appropriate LAN rights.
  2028. *
  2029. *   In spite of what the FoxPro manuals may lead you to believe,
  2030. *   if the named file does not exist or if an invalid file name
  2031. *   or subdirectory has been used, Error #1 is returned, not
  2032. *   Error #1101.
  2033. *
  2034. *   User is sent to DOS after being returned to calling module.
  2035. *   Assumption is that if user does not have rights to open this
  2036. *   file user will also not have rights to open other files on
  2037. *   the LAN, therefore, no attempt is made (at the calling level)
  2038. *   to save error info to disk.  Using the same assumption, it
  2039. *   will not be possible to open the CALLWHOM file to obtain info
  2040. *   on the person who should be called.
  2041. *
  2042. *   Author: Pat Adams  (718) 469-4032
  2043. *   Date: 8/8//91
  2044. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2045. DEFINE WINDOW bugbox FROM  5,23 TO 15,57 DOUBLE ;
  2046.     COLOR N/W,N/W,R+*/W SHADOW
  2047. ACTIVATE SCREEN
  2048. ACTIVATE WINDOW bugbox
  2049. @ 0, 7 SAY "   S O R R Y  " COLOR *+R/W
  2050. @ 2, 1 SAY "It appears you do not have the"
  2051. @ 3, 1 SAY "correct user rights on the LAN."
  2052. @ 5, 1 SAY "Please contact your LAN Admin-"
  2053. @ 6, 1 SAY "istrator to report this problem."
  2054. @ 8, 1 SAY "Press any key to quit to DOS..." COLOR +N/W
  2055. = INKEY(0, "MH")
  2056. RELEASE WINDOW bugbox
  2057. RETURN
  2058. * End procedure BADRIGHTS
  2059.  
  2060.  
  2061.  
  2062. *!*********************************************************************
  2063. *!
  2064. *!      Procedure: REALBAD
  2065. *!
  2066. *!      Called by: PRO2EROR.PRG                      
  2067. *!
  2068. *!          Calls: A_LERT             (procedure in PRO2EROR.PRG)
  2069. *!
  2070. *!           Uses: CALLWHOM.DBF       
  2071. *!
  2072. *!*********************************************************************
  2073. PROCEDURE realbad
  2074. ***********************************************************************
  2075. *& Database is trashed
  2076. *
  2077. *   Error #15 - Not a database file
  2078. *
  2079. *   Error #1115 - Database record is trashed
  2080. *                 Bad file header
  2081. *
  2082. *   Both errors can be caused by a bad .DBF file header.
  2083. *   Error # 15 can also occur is attempting to use a non-
  2084. *   .DBF file as a .DBF file.
  2085. *
  2086. *   Author: Pat Adams  (718) 469-4032
  2087. *   Date: 8/9/91
  2088. *
  2089. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2090. DEFINE WINDOW bugbox FROM 5,22 TO 18,58 DOUBLE ;
  2091.     COLOR N/W,N/W,R+*/W SHADOW
  2092. ACTIVATE SCREEN
  2093. ACTIVATE WINDOW bugbox
  2094. @ 0, 6 SAY "  REALLY BAD NEWS  " COLOR *+R/W
  2095. @ 2, 1 SAY "A database file has been trashed!"
  2096. @ 4,10 SAY "Please contact"
  2097. SELECT 0
  2098. USE callwhom
  2099. * ========================================
  2100. *$ Get info on appropriate person to call
  2101. * ========================================
  2102. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  2103. STORE ALLTRIM(callwhom->call_who) TO m_call
  2104. STORE ALLTRIM(callwhom->other) TO m_title
  2105. STORE ALLTRIM(callwhom->phone) TO m_phone
  2106. @ 5, 0 SAY PADC(m->m_call, 35)
  2107. @ 6, 0 SAY PADC(m->m_title, 35)
  2108. @ 7, 0 SAY PADC(m->m_phone, 35)
  2109. @ 8, 6 SAY "to report this problem."
  2110. @10, 1 SAY "Press any key to" COLOR +N/W
  2111. @11, 1 SAY "return to Main Menu..." COLOR +N/W
  2112. DO a_lert           && Sound siren
  2113. = INKEY(0, "MH")
  2114. RELEASE WINDOW bugbox
  2115. RETURN
  2116. * End procedure REALBAD
  2117.  
  2118.  
  2119.  
  2120. *!*********************************************************************
  2121. *!
  2122. *!      Procedure: A_LERT
  2123. *!
  2124. *!      Called by: REALBAD            (procedure in PRO2EROR.PRG)
  2125. *!
  2126. *!*********************************************************************
  2127. PROCEDURE a_lert
  2128. ***********************************************************************
  2129. *& Soundwarning siren
  2130. *
  2131. *   Author: Pat Adams  (718) 469-4032
  2132. *   Date: 8/9/91
  2133. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2134. FOR xx = 1 TO 3
  2135.     SET BELL TO 1650-(18*xx), 3
  2136.     ?? CHR(7)
  2137.     SET BELL TO 650-(5*xx),3
  2138.     ?? CHR(7)
  2139. ENDFOR (xx)
  2140.  
  2141. SET BELL TO
  2142. RETURN
  2143. * End procedure a_lert
  2144.  
  2145.  
  2146. *!*********************************************************************
  2147. *!
  2148. *!      Procedure: KORRUPT
  2149. *!
  2150. *!      Called by: PRO2EROR.PRG                      
  2151. *!
  2152. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2153. *!
  2154. *!           Uses: CALLWHOM.DBF       
  2155. *!
  2156. *!*********************************************************************
  2157. PROCEDURE korrupt
  2158. **********************************************************************
  2159. *& Corrupted object file
  2160. *
  2161. *   Error #67 - Internal consistency error
  2162. *
  2163. *   Error #1309 - Not an object file
  2164. *
  2165. *   Compiled object file has been corrupted - Recompile
  2166. *
  2167. *   Author: Pat Adams  (718) 469-4032
  2168. *   Date: 8/9/91
  2169. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2170. DEFINE WINDOW bugbox FROM 5,22 TO 18,58 DOUBLE ;
  2171.     COLOR N/W,N/W,R+*/W SHADOW
  2172. ACTIVATE SCREEN
  2173. ACTIVATE WINDOW bugbox
  2174. @ 0, 9 SAY "  BAD NEWS  " COLOR *+R/W
  2175. @ 2, 1 SAY "An object file has been corrupted."
  2176. @ 4,10 SAY "Please contact"
  2177. SELECT 0
  2178. USE callwhom
  2179. * ========================================
  2180. *$ Get info on appropriate person to call
  2181. * ========================================
  2182. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  2183. STORE ALLTRIM(callwhom->call_who) TO m_call
  2184. STORE ALLTRIM(callwhom->other) TO m_title
  2185. STORE ALLTRIM(callwhom->phone) TO m_phone
  2186. @ 5, 0 SAY PADC(m->m_call, 35)
  2187. @ 6, 0 SAY PADC(m->m_title, 35)
  2188. @ 7, 0 SAY PADC(m->m_phone, 35)
  2189. @ 8, 6 SAY "to report this problem."
  2190. DO razberry
  2191. @10, 1 SAY "Press any key to" COLOR +N/W
  2192. @11, 1 SAY "return to Main Menu..." COLOR +N/W
  2193. = INKEY(0, "MH")
  2194. RELEASE WINDOW bugbox
  2195. RETURN
  2196. * End procedure KORRUPT
  2197.  
  2198.  
  2199. *!*********************************************************************
  2200. *!
  2201. *!      Procedure: READ_ERR
  2202. *!
  2203. *!      Called by: PRO2EROR.PRG                      
  2204. *!
  2205. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2206. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  2207. *!
  2208. *!           Uses: CALLWHOM.DBF       
  2209. *!
  2210. *!*********************************************************************
  2211. PROCEDURE read_err
  2212. ***********************************************************************
  2213. *  Error #1104 - File read error
  2214. *
  2215. *  The operating system returned an error to FoxPro
  2216. *  while FoxPro was attempting to read a file.  It could
  2217. *  just be a "hiccup" or there could be problems with the
  2218. *  disk, controller or LAN connection.  Provide user with
  2219. *  option to retry.
  2220. *
  2221. *    Author: Pat Adams, DB Unlimited
  2222. *   Date: 8/9/91
  2223. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2224. PARAMETERS rretry
  2225. DEFINE WINDOW bugbox FROM 3,14 TO 20,66 DOUBLE ;
  2226.     COLOR N/W,N/W,R+*/W SHADOW
  2227. ACTIVATE SCREEN
  2228. ACTIVATE WINDOW bugbox
  2229. @ 0,16 SAY "   BAD NEWS   " COLOR *+R/W
  2230. @ 2, 1 SAY "Your hardware and/or operating system returned an"
  2231. @ 3, 1 SAY "error while attempting to read a file.  It may be"
  2232. @ 4, 1 SAY "that this was just a minor 'hiccup' or you may be"
  2233. @ 5, 1 SAY "experiencing serious hardware problems."
  2234. @ 7, 1 SAY "If this is the first time you have received this"
  2235. @ 8, 1 SAY "error message try things again.  If not, your"
  2236. @ 9, 1 SAY "hard disk, controller and LAN connections should"
  2237. @10, 1 SAY "be checked - report the problem to:"
  2238. SELECT 0
  2239. USE callwhom
  2240. * ========================================
  2241. *$ Get info on appropriate person to call
  2242. * ========================================
  2243. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  2244. STORE ALLTRIM(callwhom->call_who) TO m_call
  2245. STORE ALLTRIM(callwhom->other) TO m_title
  2246. STORE ALLTRIM(callwhom->phone) TO m_phone
  2247. @11, 0 SAY PADC(m->m_call, 51)
  2248. @12, 0 SAY PADC(m->m_title, 51)
  2249. @13, 0 SAY PADC(m->m_phone, 51)
  2250. DO razberry
  2251. @15, 9 SAY "Do you want to try again?   (Y/N)"
  2252. DO yes_no WITH rretry
  2253. RELEASE WINDOW bugbox
  2254. RETURN rretry
  2255. * End procedure READ_ERR
  2256.  
  2257.  
  2258.  
  2259. *!*********************************************************************
  2260. *!
  2261. *!      Procedure: RITE_ERR
  2262. *!
  2263. *!      Called by: PRO2EROR.PRG                      
  2264. *!
  2265. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2266. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  2267. *!
  2268. *!           Uses: CALLWHOM.DBF       
  2269. *!
  2270. *!*********************************************************************
  2271. PROCEDURE rite_err
  2272. ***********************************************************************
  2273. *& File write error - Error # 1105
  2274. *
  2275. *   The most likely causes of this error are:
  2276. *
  2277. *   1.  An attempt to write to a floppy which is
  2278. *       write protected or a LAN subdirectory to
  2279. *       which the user does not have correct rights
  2280. *
  2281. *   2.  A problem with the operating system, hard disk,
  2282. *       controller, or LAN connections
  2283. *
  2284. *   User is provided with option to retry
  2285. *
  2286. *    Author: Pat Adams, DB Unlimited
  2287. *   Date: 8/9/91
  2288. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2289. PARAMETERS re_try
  2290. DEFINE WINDOW bugbox FROM  3,4 TO 20,76 DOUBLE ;
  2291.     COLOR N/W,N/W,R+*/W SHADOW
  2292. ACTIVATE SCREEN
  2293. ACTIVATE WINDOW bugbox
  2294. @ 0,26 SAY "   BAD NEWS   " COLOR *+R/W
  2295. @ 2, 1 SAY "A problem has occurred while attempting " + ;
  2296.     "to write information to disk."
  2297. @ 3, 1 SAY "If you are attempting to write " + ;
  2298.     "to a floppy disk it may be that the"
  2299. @ 4, 1 SAY "disk is write protected.  If so, " + ;
  2300.     "unprotect the disk and try again."
  2301. @ 6, 1 SAY "If not, a 'hiccup' in the operating " + ;
  2302.     "system may have occurred.  You"
  2303. @ 7, 1 SAY "can simply try again.  However, if " + ;
  2304.     "this message continues to appear"
  2305. @ 8, 1 SAY "it may be that there is a problem " + ;
  2306.     "with the hard disk, controller,"
  2307. @ 9, 1 SAY "LAN connections or your LAN " + ;
  2308.     "authorization rights.  Please contact:"
  2309. SELECT 0
  2310. USE callwhom
  2311. * ========================================
  2312. *$ Get info on appropriate person to call
  2313. * ========================================
  2314. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  2315. STORE ALLTRIM(callwhom->call_who) TO m_call
  2316. STORE ALLTRIM(callwhom->other) TO m_title
  2317. STORE ALLTRIM(callwhom->phone) TO m_phone
  2318. @10, 0 SAY PADC(m->m_call, 71)
  2319. @11, 0 SAY PADC(m->m_title, 71)
  2320. @12, 0 SAY PADC(m->m_phone, 71)
  2321. @13, 1 SAY "to report this problem."
  2322. DO razberry
  2323. @15,20 SAY "Do you want to try again? (Y/N)"
  2324. DO yes_no WITH re_try
  2325. RELEASE WINDOW bugbox
  2326. RETURN re_try
  2327. * End procedure RITE_ERR
  2328.  
  2329.  
  2330. *!*********************************************************************
  2331. *!
  2332. *!      Procedure: INVALPRN
  2333. *!
  2334. *!      Called by: PRO2EROR.PRG                      
  2335. *!
  2336. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2337. *!
  2338. *!           Uses: CALLWHOM.DBF       
  2339. *!
  2340. *!*********************************************************************
  2341. PROCEDURE invalprn
  2342. ************************************************************************
  2343. *
  2344. *   Error #124 - Invalid printer redirection
  2345. *
  2346. *  This normally occurs when attempts are made to share a non-
  2347. *  sharable printer on a LAN or the path to the print device
  2348. *  has not been properly defined.
  2349. *
  2350. *  User will be returned to MASTER module.
  2351. *
  2352. *    Author: Pat Adams, DB Unlimited
  2353. *   Date: 8/9/91
  2354. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2355. DEFINE WINDOW bugbox FROM 3,17 TO 21,62 DOUBLE ;
  2356.     COLOR N/W,N/W,R+*/W SHADOW
  2357. ACTIVATE SCREEN
  2358. ACTIVATE WINDOW bugbox
  2359. @ 0,12 SAY "   W H O O P S   "
  2360. @ 2, 1 SAY "An attempt was made to use an unavailable"
  2361. @ 3, 1 SAY "print device.  Either the printer you want"
  2362. @ 4, 1 SAY "is not sharable or the correct DOS PATH"
  2363. @ 5, 1 SAY "setting has not been made.  This latter"
  2364. @ 6, 1 SAY "problem can only be fixed by returning to"
  2365. @ 7, 1 SAY "DOS, correcting matters there and then"
  2366. @ 8, 1 SAY "entering this application again."
  2367. @10,15 SAY "Please contact"
  2368. SELECT 0
  2369. USE callwhom
  2370. * ========================================
  2371. *$ Get info on appropriate person to call
  2372. * ========================================
  2373. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  2374. STORE ALLTRIM(callwhom->call_who) TO m_call
  2375. STORE ALLTRIM(callwhom->other) TO m_title
  2376. STORE ALLTRIM(callwhom->phone) TO m_phone
  2377. @11, 0 SAY PADC(m->m_call, 43)
  2378. @12, 0 SAY PADC(m->m_title, 43)
  2379. @13, 0 SAY PADC(m->m_phone, 43)
  2380. @14,11 SAY "to report this problem."
  2381. @16, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  2382. DO razberry
  2383. = INKEY(0, "MH")
  2384. RELEASE WINDOW bugbox
  2385. RETURN
  2386. * End procedure INVALPRN
  2387.  
  2388.  
  2389.  
  2390. *!*********************************************************************
  2391. *!
  2392. *!      Procedure: NOTREADY
  2393. *!
  2394. *!      Called by: PRO2EROR.PRG                      
  2395. *!
  2396. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2397. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  2398. *!
  2399. *!*********************************************************************
  2400. PROCEDURE notready
  2401. ***********************************************************************
  2402. * Error #125 - Printer not ready
  2403. *
  2404. *   This error is triggered by a variety of problems:
  2405. *
  2406. *   1.  The printer is not turned on or plugged in.
  2407. *
  2408. *   2.  Printer is not on-line
  2409. *
  2410. *   3.  Printer out of paper or a paper jam has occurred
  2411. *
  2412. *   4.  The printer is timing out.  Changing the CONFIG.FP file
  2413. *       to include the statement:
  2414. *
  2415. *           TIME=10000000
  2416. *
  2417. *       and issuing a DOS command:
  2418. *
  2419. *           MODE LPT1,,p
  2420. *
  2421. *       to set up DOS for inifinte retry of the printer will
  2422. *       usually help.
  2423. *
  2424. *   5.  The connection between the computer and the printer may
  2425. *       not be solid or the printer cable may be squashed.
  2426. *
  2427. *   Note that this error will occur infrequently, if at all, on a
  2428. *   LAN because output will normally be sent to a print spooler.
  2429. *
  2430. *   User is provided the option to try again for the printer or
  2431. *   Abort to the MASTER module.
  2432. *
  2433. *   Author: Pat Adams  (718) 469-4032
  2434. *   Date: 8/13/91
  2435. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2436. PARAMETERS re_try
  2437. DEFINE WINDOW bugbox FROM 5,9 TO 18,71 DOUBLE ;
  2438.     COLOR N/W,N/W,R+*/W SHADOW
  2439. ACTIVATE SCREEN
  2440. ACTIVATE WINDOW bugbox
  2441. @ 0,20 SAY "   W H O O P S   " COLOR *+R/W
  2442. @ 2, 1 SAY "There is a problem with your printer.  Check the following:"
  2443. @ 4, 1 SAY "1.  Is the printer turned on?"
  2444. @ 6, 1 SAY "2.  Is the printer on-line? (A green light on the printer"
  2445. @ 7, 5 SAY "usually indicates the printer is on-line.)"
  2446. @ 9, 1 SAY "3.  Is the printer out of paper or is there a paper jam?"
  2447. @11, 2 SAY "WOULD YOU LIKE TO TRY FOR USE OF THE PRINTER AGAIN?  (Y/N)"
  2448. * ====================
  2449. *$ Sound Bronx cheer
  2450. * ====================
  2451. DO razberry
  2452. DO yes_no WITH re_try
  2453. RELEASE WINDOW bugbox
  2454. RETURN re_try
  2455. * End procedure NOTREADY
  2456.  
  2457.  
  2458.  
  2459. *!*********************************************************************
  2460. *!
  2461. *!      Procedure: PKORRUPT
  2462. *!
  2463. *!      Called by: PRO2EROR.PRG                      
  2464. *!
  2465. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2466. *!
  2467. *!           Uses: CALLWHOM.DBF       
  2468. *!
  2469. *!*********************************************************************
  2470. PROCEDURE pkorrupt
  2471. ***********************************************************************
  2472. *& Error #1643 - Printer driver corrupted
  2473. ** Error #1644 - Printer driver is missing
  2474. *
  2475. *   Author: Pat Adams  (718) 469-4032
  2476. *   Date: 8/13/91
  2477. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2478. DEFINE WINDOW bugbox FROM 5,14 TO 18,66 DOUBLE ;
  2479.     COLOR N/W,N/W,R+*/W SHADOW
  2480. ACTIVATE SCREEN
  2481. ACTIVATE WINDOW bugbox
  2482. @ 0,17 SAY "  BAD NEWS  " COLOR *+R/W
  2483. @ 2, 1 SAY "Your printer driver has been corrupted.  Printing"
  2484. @ 3, 1 SAY "can not be done until this is corrected."
  2485. @ 5,18 SAY "Please contact"
  2486. SELECT 0
  2487. USE callwhom
  2488. * ========================================
  2489. *$ Get info on appropriate person to call
  2490. * ========================================
  2491. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  2492. STORE ALLTRIM(callwhom->call_who) TO m_call
  2493. STORE ALLTRIM(callwhom->other) TO m_title
  2494. STORE ALLTRIM(callwhom->phone) TO m_phone
  2495. @ 6, 0 SAY PADC(m->m_call, 50)
  2496. @ 7, 0 SAY PADC(m->m_title, 50)
  2497. @ 8, 0 SAY PADC(m->m_phone, 50)
  2498. @ 9,15 SAY "to report this problem."
  2499. @11, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  2500. DO razberry
  2501. = INKEY(0, "MH")
  2502. RELEASE WINDOW bugbox
  2503. * End procedure PKORRUPT
  2504.  
  2505.  
  2506. *!*********************************************************************
  2507. *!
  2508. *!      Procedure: LOWFILES
  2509. *!
  2510. *!      Called by: PRO2EROR.PRG                      
  2511. *!
  2512. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2513. *!
  2514. *!           Uses: CALLWHOM.DBF       
  2515. *!
  2516. *!*********************************************************************
  2517. PROCEDURE lowfiles
  2518. ***********************************************************************
  2519. *$ Error #6 - Too many files open
  2520. *
  2521. *   FoxPro 2.0 supports 99 open file handles in FoxPro.  A FILES=
  2522. *   statement in the CONFIG.FP file is not necessary and, if
  2523. *   present will be ignored.  However, the following conditions
  2524. *   must be present on the computer, work node and file server:
  2525. *
  2526. *   1.  CONFIG.SYS must include the FILES= statement.  Although
  2527. *       different vendor editions of different versions of DOS
  2528. *       support a different FILES= maximum, in general DOS 3.3
  2529. *       and above supports a maximum of 250 file handles.  Usually
  2530. *       a CONFIG.SYS statement of FILES=105 is sufficient.
  2531. *
  2532. *   2.  Depending upon the LAN OS in use, the work node may need
  2533. *       a specific file handles statement for the LAN OS.  DOS
  2534. *       based LANs such as InvisibleNET and LANtastic use the DOS
  2535. *       CONFIG.SYS statement while LANs such as Novell require the
  2536. *       SHELL.CFG or NET.CFG file on each work station with a
  2537. *       FILE HANDLES=xxxx statement.  Otherwise Novell will default
  2538. *       to 40 file handles no matter what the CONFIG.SYS setting.
  2539. *       If both a NET.CFG and SHELL.CFG are present on the work node
  2540. *       the NET.CFG file settings take precedence.
  2541. *
  2542. *   3.  Novell LANs also require that the FILE HANDLES setting for
  2543. *       the server be adjusted upwards.  Otherwise the default will
  2544. *       be 40 file handles and this will take precedence over any
  2545. *       settings on the work node.
  2546. *
  2547. *   Author: Pat Adams  (718) 469-4032
  2548. *   Date: 8/13/91
  2549. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2550. DEFINE WINDOW bugbox FROM 1,12 TO 22,68 DOUBLE ;
  2551.     COLOR N/W,N/W,R+*/W SHADOW
  2552. ACTIVATE SCREEN
  2553. ACTIVATE WINDOW bugbox
  2554. @ 0,19 SAY "  BAD NEWS  " *+R/W
  2555. @ 2, 9 SAY "You don't have enough 'file handles!'"
  2556. @ 4, 1 SAY "1.  Increase the FILES= statement in your CONFIG.SYS."
  2557. @ 6, 1 SAY "2.  If working on a Novell LAN increase the FILE"
  2558. @ 7, 5 SAY "HANDLES= statement in the SHELL.CFG file."
  2559. * =============================================
  2560. * NOTE: This message should be modified for
  2561. *       those working with a stand-alone system
  2562. * =============================================
  2563. @ 9, 1 SAY "3.  If you are attached to a Novell LAN the FILE"
  2564. @10, 5 SAY "HANDLES= statement on the LAN server may also"
  2565. @11, 5 SAY "need to be increased."
  2566. @13,19 SAY "Please contact"
  2567. SELECT 0
  2568. USE callwhom
  2569. * ========================================
  2570. *$ Get info on appropriate person to call
  2571. * ========================================
  2572. LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  2573. STORE ALLTRIM(callwhom->call_who) TO m_call
  2574. STORE ALLTRIM(callwhom->other) TO m_title
  2575. STORE ALLTRIM(callwhom->phone) TO m_phone
  2576. @14, 0 SAY PADC(m->m_call, 55)
  2577. @15, 0 SAY PADC(m->m_title, 55)
  2578. @16, 0 SAY PADC(m->m_phone, 55)
  2579. @17,16 SAY "to report this problem."
  2580. @19, 1 SAY "Press any key to return to Main Menu..."
  2581. DO razberry
  2582. = INKEY(0, "MH")
  2583. RELEASE WINDOW bugbox
  2584. RETURN
  2585. * End procedure LOWFILES
  2586.  
  2587.  
  2588. *!*********************************************************************
  2589. *!
  2590. *!      Procedure: NOMEMO
  2591. *!
  2592. *!      Called by: PRO2EROR.PRG                      
  2593. *!
  2594. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2595. *!
  2596. *!           Uses: CALLWHOM.DBF       
  2597. *!
  2598. *!*********************************************************************
  2599. PROCEDURE nomemo
  2600. ***********************************************************************
  2601. *& Error #41 - MEMO file is missing/invalid
  2602. *
  2603. *   The most likely cause of this error is an attempt to
  2604. *   USE a database file whose associated memo file (either
  2605. *   .DBT or .FPT) has been erased.
  2606. *
  2607. *   Other possible causes include a trashed .DBT or .FPT file
  2608. *   or a .DBT/.FPT file which does not match the .DBF file.
  2609. *
  2610. *   User is returned to the MASTER module.  Depending upon the
  2611. *   application, it may be desirable to change this so the user
  2612. *   is returned to DOS.
  2613. *
  2614. *   Author: Pat Adams  (718) 469-4032
  2615. *   Date: 8/14/91
  2616. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2617. DEFINE WINDOW nomeom FROM 3,16 TO 19,63 DOUBLE ;
  2618.     COLOR N/W,N/W,R+*/W SHADOW
  2619. ACTIVATE SCREEN
  2620. ACTIVATE WINDOW bugbox
  2621. @ 0,15 SAY "  BAD NEWS  " COLOR *+R/W
  2622. @ 2, 1 SAY "A 'memo field' file which contains free form"
  2623. @ 3, 1 SAY "text has been erased or does not properly"
  2624. @ 4, 1 SAY "match its corresponding database file.  It's"
  2625. @ 5, 1 SAY "not possible to continue until this has been"
  2626. @ 6, 1 SAY "corrected."
  2627. @ 8,16 SAY "Please contact"
  2628. SELECT 0
  2629. USE callwhom
  2630. * ========================================
  2631. *$ Get info on appropriate person to call
  2632. * ========================================
  2633. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  2634. STORE ALLTRIM(callwhom->call_who) TO m_call
  2635. STORE ALLTRIM(callwhom->other) TO m_title
  2636. STORE ALLTRIM(callwhom->phone) TO m_phone
  2637. @ 9, 0 SAY PADC(m->m_call, 46)
  2638. @10, 0 SAY PADC(m->m_title, 46)
  2639. @11, 0 SAY PADC(m->m_phone, 46)
  2640. @12,12 SAY "to report the problem."
  2641. @14, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  2642. DO razberry
  2643. = INKEY(0, "MH")
  2644. RELEASE WINDOW bugbox
  2645. RETURN
  2646. * End procedure NOMEMO
  2647.  
  2648.  
  2649.  
  2650. *!*********************************************************************
  2651. *!
  2652. *!      Procedure: LOWMEMRY
  2653. *!
  2654. *!      Called by: PRO2EROR.PRG                      
  2655. *!
  2656. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2657. *!
  2658. *!           Uses: CALLWHOM.DBF       
  2659. *!
  2660. *!*********************************************************************
  2661. PROCEDURE lowmemry
  2662. ***********************************************************************
  2663. *& Error #43 - Insufficient memory
  2664. *
  2665. *& Error #809 - SQL out of memory
  2666. *
  2667. *& Error #845 - SQL expression too complex
  2668. *               FoxPro ran out of memory when it
  2669. *               tried to expand the SELECT
  2670. *               statement to analyze it
  2671. *
  2672. *& Error #1149 - No memory for buffer
  2673. *
  2674. *& Error #1150 - No memory for file map
  2675. *
  2676. *& Error #1151 - No memory for file name
  2677. *
  2678. *& Error #1600 - Not enough memory to USE database
  2679. *
  2680. *   User will be returned to DOS
  2681. *
  2682. *   Author: Pat Adams  (718) 469-4032
  2683. *   Date: 8/14/91
  2684. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2685. DEFINE WINDOW bugbox FROM 5,17 TO 17,62 DOUBLE ;
  2686.     COLOR N/W,N/W,R+*/W SHADOW
  2687. ACTIVATE SCREEN
  2688. ACTIVATE WINDOW bugbox
  2689. @ 0,14 SAY "  BAD NEWS  " *+R/W
  2690. @ 2, 1 SAY "Your computer does not have enough memory."
  2691. @ 4,15 SAY "Please contact"
  2692. SELECT 0
  2693. USE callwhom
  2694. * ========================================
  2695. *$ Get info on appropriate person to call
  2696. * ========================================
  2697. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  2698. STORE ALLTRIM(callwhom->call_who) TO m_call
  2699. STORE ALLTRIM(callwhom->other) TO m_title
  2700. STORE ALLTRIM(callwhom->phone) TO m_phone
  2701. @ 5, 0 SAY PADC(m->m_call, 44)
  2702. @ 6, 0 SAY PADC(m->m_title, 44)
  2703. @ 7, 0 SAY PADC(m->m_phone, 44)
  2704. @ 8,11 SAY "to report the problem."
  2705. @10, 1 SAY "Press any key to return to DOS..." COLOR +N/W
  2706. DO razberry
  2707. = INKEY(0, "MH")
  2708. RELEASE WINDOW bugbox
  2709. RETURN
  2710. * End procedure LOWMEMRY
  2711.  
  2712.  
  2713. *!*********************************************************************
  2714. *!
  2715. *!      Procedure: BAD_RPT
  2716. *!
  2717. *!      Called by: PRO2EROR.PRG                      
  2718. *!
  2719. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2720. *!
  2721. *!           Uses: CALLWHOM.DBF       
  2722. *!
  2723. *!*********************************************************************
  2724. PROCEDURE bad_rpt
  2725. ***********************************************************************
  2726. *& Error #50 - Report file invalid
  2727. *& Error #54 - Label file invalid
  2728. *& Error #1241 - Improper data type in group expression
  2729. *& Error #1243 - Internal error: Too many characters in report
  2730. *& Error #1245 - Error in label field definition
  2731. *& Error #1246 - Total label width exceeds maximum allowable
  2732. *& Error #1645 - Report nesting error
  2733. *& Error #1646 - Total field type in report must be numeric
  2734. *& Error #1647 - Improper data type in field expression
  2735. *
  2736. *   The most likely causes of this error are:
  2737. *
  2738. *   1.  Syntax error in the REPORT FORM .FRX file
  2739. *       or the LABEL FORM file
  2740. *
  2741. *   2.  Descriptions in the REPORT or LABEL FORM file do
  2742. *       not match the database
  2743. *
  2744. *   3.  The REPORT or LABEL file has become corrupted
  2745. *
  2746. *   Author: Pat Adams  (718) 469-4032
  2747. *   Date: 8/14/91
  2748. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2749. PARAMETERS error_no
  2750. PRIVATE which1, which2
  2751.  
  2752. IF error_no = 50 .OR. error_no = 1241 .OR. error_no = 1243 ;
  2753.         .OR. error_no = 1645 .OR. error_no = 1646 .OR. error_no ;
  2754.         = 1647
  2755.     STORE "report" TO which1, which2
  2756. ELSE
  2757.     STORE "label" TO which1
  2758.     STORE "labels" TO which2
  2759. ENDIF (error_no = 50 .OR. error_no = 1241 .OR. error_no = 1243 ;)
  2760.  
  2761. DEFINE WINDOW bugbox FROM 5,19 TO 19,61 DOUBLE ;
  2762.     COLOR N/W,N/W,R+*/W SHADOW
  2763. ACTIVATE SCREEN
  2764. ACTIVATE WINDOW bugbox
  2765. @ 0,10 SAY "   W H O O P S  " COLOR *+R/W
  2766. @ 2, 1 SAY "There is a problem with the &which1 form"
  2767. @ 3, 1 SAY "file.  The &which2 can not be generated"
  2768. @ 4, 1 SAY "until the problem is corrected."
  2769. @ 6,13 SAY "Please contact"
  2770. SELECT 0
  2771. USE callwhom
  2772. * ========================================
  2773. *$ Get info on appropriate person to call
  2774. * ========================================
  2775. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  2776. STORE ALLTRIM(callwhom->call_who) TO m_call
  2777. STORE ALLTRIM(callwhom->other) TO m_title
  2778. STORE ALLTRIM(callwhom->phone) TO m_phone
  2779. @ 7, 0 SAY PADC(m->m_call, 41)
  2780. @ 8, 0 SAY PADC(m->m_title, 41)
  2781. @ 9, 0 SAY PADC(m->m_phone, 41)
  2782. @10, 9 SAY "to report the problem."
  2783. @12, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  2784. DO razberry
  2785. =INKEY(0, "MH")
  2786. RELEASE WINDOW bugbox
  2787. RETURN
  2788. * End procedure BAD_RPT
  2789.  
  2790.  
  2791. *!*********************************************************************
  2792. *!
  2793. *!      Procedure: BADMEMFL
  2794. *!
  2795. *!      Called by: PRO2EROR.PRG                      
  2796. *!
  2797. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  2798. *!
  2799. *!           Uses: CALLWHOM.DBF       
  2800. *!
  2801. *!*********************************************************************
  2802. PROCEDURE badmemfl
  2803. ***********************************************************************
  2804. *& Error #55 - Memory Variable file is invalid
  2805. *
  2806. *   An attempt was made to RESTORE FROM a .MEM file
  2807. *   which has been trashed.
  2808. *
  2809. *   If info in the .MEM file is necessary to the overall
  2810. *   application change this module so user is returned to DOS.
  2811. *
  2812. *   Author: Pat Adams  (718) 469-4032
  2813. *   Date: 8/14/91
  2814. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2815. DEFINE WINDOW bugbox FROM 4,19 TO 19,61 DOUBLE ;
  2816.     COLOR N/W,N/W,R+*/W SHADOW
  2817. ACTIVATE SCREEN
  2818. ACTIVATE WINDOW bugbox
  2819. @ 0,10 SAY "   W H O O P S  " COLOR *+R/W
  2820. @ 2, 1 SAY "There is a problem with a 'memory' file"
  2821. @ 3, 1 SAY "which contains necessary information."
  2822. @ 4, 1 SAY "This option can not be used until the"
  2823. @ 5, 1 SAY "problem has been corrected."
  2824. @ 7,13 SAY "Please contact"
  2825. SELECT 0
  2826. USE callwhom
  2827. * ========================================
  2828. *$ Get info on appropriate person to call
  2829. * ========================================
  2830. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  2831. STORE ALLTRIM(callwhom->call_who) TO m_call
  2832. STORE ALLTRIM(callwhom->other) TO m_title
  2833. STORE ALLTRIM(callwhom->phone) TO m_phone
  2834. @ 8, 0 SAY PADC(m->m_call, 41)
  2835. @ 9, 0 SAY PADC(m->m_title, 41)
  2836. @10, 0 SAY PADC(m->m_phone, 41)
  2837. @11, 9 SAY "to report the problem."
  2838. @13, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  2839. DO razberry
  2840. = INKEY(0, "MH")
  2841. RELEASE WINDOW bugbox
  2842. RETURN
  2843. * End procedure BADMEMFL
  2844.  
  2845.  
  2846.  
  2847. *!*********************************************************************
  2848. *!
  2849. *!      Procedure: NOSPACE
  2850. *!
  2851. *!      Called by: PRO2EROR.PRG                      
  2852. *!
  2853. *!          Calls: ISLAN              (procedure in PRO2EROR.PRG)
  2854. *!               : RAZBERRY           (procedure in PRO2EROR.PRG)
  2855. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  2856. *!
  2857. *!*********************************************************************
  2858. PROCEDURE nospace
  2859. ***********************************************************************
  2860. *& Error #56 - Not enough disk space
  2861. *
  2862. *   User has run out of disk space on a local hard disk,
  2863. *   a floppy disk, or in a LAN server subdirectory.
  2864. *
  2865. *   If user has a printer available send error output to
  2866. *   the printer.  An attempt is not made to USE the CALLWHOM
  2867. *   file since this error condition may preclude such activity.
  2868. *
  2869. *   Menachem Bazian reports that the "out of disk" error has
  2870. *   been erroneously reported under both Novell 2.15C and Novell
  2871. *   3.11 at times.  This has been traced to files which have no
  2872. *   "owner" but, instead, are classified as N/A under Novell.
  2873. *   Without a Novell owner the size of a file can not be
  2874. *   increased.  Theoretically it should not be possible for a
  2875. *   file to be created under Novell without an owner, however...
  2876. *
  2877. *   Author: Pat Adams  (718) 469-4032
  2878. *   Date: 8/14/91
  2879. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2880. PARAMETERS doprint
  2881.  
  2882. IF islan()
  2883.     * ==========================================
  2884.     *$ Provide user with error info appropriate
  2885.     *$ to those using a LAN
  2886.     * ==========================================
  2887.     DEFINE WINDOW bugbox FROM 5,14 TO 17,66 DOUBLE ;
  2888.         COLOR N/W,N/W,R+*/W SHADOW
  2889.     ACTIVATE SCREEN
  2890.     ACTIVATE WINDOW bugbox
  2891.     @ 0,14 SAY "  REALLY BAD NEWS  " COLOR *+R/W
  2892.     @ 2, 1 SAY "You have run out of space on the LAN subdirectory"
  2893.     @ 3, 1 SAY "in use, on your local hard disk or on the floppy"
  2894.     @ 4, 1 SAY "disk if you are attempting to write to a floppy."
  2895.     @ 6, 1 SAY "Information about this problem will be send to"
  2896.     @ 7, 1 SAY "the printer before returning you to DOS.  Please"
  2897.     @ 8, 1 SAY "give a copy to your LAN administrator."
  2898.     @10, 1 SAY "Press any key to continue..." COLOR +N/W
  2899.     DO razberry
  2900.     = INKEY(0, "MH")
  2901.     * ==================================
  2902.     * Assumption is that a printer will
  2903.     * always be available on a LAN
  2904.     * ==================================
  2905.     STORE .T. TO doprint
  2906. ELSE
  2907.     * ==========================================
  2908.     *$ Otherwise display error info appropriate
  2909.     *$ to a stand-alone system
  2910.     * ==========================================
  2911.     DEFINE WINDOW nospace FROM 6,16 TO 15,64 DOUBLE ;
  2912.         COLOR N/W,N/W,R+*/W SHADOW
  2913.     ACTIVATE SCREEN
  2914.     ACTIVATE WINDOW nospace
  2915.     @ 0,12 SAY "  REALLY BAD NEWS  " COLOR *+R/W
  2916.     @ 2, 1 SAY "There is no more space on your hard disk or,"
  2917.     @ 3, 1 SAY "if you are writing to a floppy disk, on that"
  2918.     @ 4, 1 SAY "floppy disk."
  2919.     @ 6, 1 SAY "Would you like to print out error information"
  2920.     @ 7, 1 SAY "before returning to DOS?  (Y/N)"
  2921.     DO razberry
  2922.     DO yes_no WITH doprint
  2923.     
  2924.     IF doprint
  2925.         DEFINE WINDOW makesure FROM 9,10 TO 12,70 "░", ;
  2926.             "░","░","░","░","░","░","░" ;
  2927.             COLOR W+*/N,N/W,W+*/N SHADOW
  2928.         ACTIVATE SCREEN
  2929.         ACTIVATE WINDOW makesure
  2930.         @ 0, 0 SAY REPLICATE("░",59)
  2931.         @ 1, 0 SAY REPLICATE("░",59)
  2932.         @ 0, 2 SAY "Please make sure your printer " + ;
  2933.             "is turned on and on-line."
  2934.         @ 1,12 SAY " Press any key to begin printing..."
  2935.         = INKEY(0, "MH")
  2936.         RELEASE WINDOW makesure
  2937.     ENDIF (doprint)
  2938. ENDIF (islan())
  2939.  
  2940. RELEASE WINDOW bugbox
  2941. RETURN doprint
  2942. * End procedure NOSPACE
  2943.  
  2944.  
  2945.  
  2946. *!*********************************************************************
  2947. *!
  2948. *!      Procedure: ISLAN
  2949. *!
  2950. *!      Called by: NOSPACE            (procedure in PRO2EROR.PRG)
  2951. *!               : SQL_IDX            (procedure in PRO2EROR.PRG)
  2952. *!               : BADCLOSE           (procedure in PRO2EROR.PRG)
  2953. *!
  2954. *!*********************************************************************
  2955. FUNCTION islan
  2956. ***********************************************************************
  2957. *& Determine if LAN is in use
  2958. *
  2959. *   NOTE: GETENV("USER") is only valid if a LAN log-in
  2960. *         which initializes a DOS environmental named
  2961. *         USER has been utilized.  This is part of the
  2962. *         most commonly used Novell log-in script.
  2963. *         Alternately, the DOS environmental can be
  2964. *         established with the DOS command:
  2965. *
  2966. *             SET USER=<user name>
  2967. *
  2968. *         before entering FoxPro.
  2969. *
  2970. *         While many network boards return a number and/or
  2971. *         name for SYS(0) there are some which do not.  This
  2972. *         needs to be tested for each LAN environment.
  2973. *
  2974. * Author: Pat Adams   10/26/90
  2975. * Modified 8/1/91 by Pat Adams
  2976. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2977. PARAMETERS if_lan
  2978.  
  2979. IF NETWORK()
  2980.     IF EMPTY(GETENV("USER")) .AND. ATC("# 0", node_no) >0
  2981.         STORE .F. TO if_lan
  2982.     ELSE
  2983.         * ===========================
  2984.         *$ LAN is in use
  2985.         * ==========================
  2986.         STORE .T. TO if_lan
  2987.     ENDIF (EMPTY(GETENV("USER")) .AND. ATC("# 0", node_no) >0)
  2988. ELSE
  2989.     STORE .F. TO if_lan
  2990. ENDIF (NETWORK())
  2991.  
  2992. RETURN if_lan
  2993. * End UDF ISLAN()
  2994.  
  2995.  
  2996.  
  2997. *!*********************************************************************
  2998. *!
  2999. *!      Procedure: BAD_DIF
  3000. *!
  3001. *!      Called by: PRO2EROR.PRG                      
  3002. *!
  3003. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3004. *!
  3005. *!           Uses: CALLWHOM.DBF       
  3006. *!
  3007. *!*********************************************************************
  3008. PROCEDURE bad_dif
  3009. ***********************************************************************
  3010. *& Error #115 - Invalid DIF file header
  3011. *& Error #116 - Invalid DIF vector-DBF field mismatch
  3012. *& Error #117 - Invalid DIF type indicator
  3013. *
  3014. *   The DIF file user is attepting to import may not
  3015. *   be in the DIF file format, the file may be corrupted,
  3016. *   or if APPEND FROM...DIF has been used the data elements
  3017. *   of the DIF file may not match the database in use.
  3018. *
  3019. * Author: Pat Adams
  3020. * Date: 8/1/91
  3021. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3022. DEFINE WINDOW bugbox FROM 4,12 TO 19,68 ;
  3023.     COLOR N/W,N/W,R+*/W SHADOW
  3024. ACTIVATE SCREEN
  3025. ACTIVATE WINDOW bugbox
  3026. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3027. @ 2, 1 SAY "There's a problem with the DIF " + ;
  3028.     "(VisiCalc) file you"
  3029. @ 3, 1 SAY "are attempting to import.  " + ;
  3030.     "It may not actually be a"
  3031. @ 4, 1 SAY "DIF file, the file header may " + ;
  3032.     "be corrupted, or the"
  3033. @ 5, 1 SAY "data elements may not match the " + ;
  3034.     "database file in use."
  3035. @ 7,20 SAY "Please contact"
  3036. SELECT 0
  3037. USE callwhom
  3038. * ========================================
  3039. *$ Get info on appropriate person to call
  3040. * ========================================
  3041. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3042. STORE ALLTRIM(callwhom->call_who) TO m_call
  3043. STORE ALLTRIM(callwhom->other) TO m_title
  3044. STORE ALLTRIM(callwhom->phone) TO m_phone
  3045. @ 8, 0 SAY PADC(m->m_call, 55)
  3046. @ 9, 0 SAY PADC(m->m_title, 55)
  3047. @10, 0 SAY PADC(m->m_phone, 41)
  3048. @11,17 SAY "to report this problem."
  3049. @13, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3050. DO razberry
  3051. = INKEY(0, "MH")
  3052. RELEASE WINDOW bugbox
  3053. RETURN
  3054. * End procedure BAD_DIF
  3055.  
  3056.  
  3057. *!*********************************************************************
  3058. *!
  3059. *!      Procedure: BAD_SYLK
  3060. *!
  3061. *!      Called by: PRO2EROR.PRG                      
  3062. *!
  3063. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3064. *!
  3065. *!           Uses: CALLWHOM.DBF       
  3066. *!
  3067. *!*********************************************************************
  3068. PROCEDURE bad_sylk
  3069. ***********************************************************************
  3070. *& Error #119 - Invalid SYLK file header -
  3071. *    File header may have been trashed
  3072. *
  3073. *& Error #120 - Invalid SYLK dimension bounds -
  3074. *    The file being imported is indicating invalid
  3075. *    rows or columns - it is 'out of bounds'
  3076. *
  3077. *& Error #121 - Invalid SYLK file format -
  3078. *    File is not a SYLK (Multiplan) file.  It may
  3079. *    be that the file is a Multiplan 4.01 file in
  3080. *    which case the MOD option should be used.
  3081. *
  3082. *   Author: Pat Adams  (718) 469-4032
  3083. *   Date: 8/14/91
  3084. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3085. DEFINE WINDOW bugbox FROM  4,12 TO 19,68 DOUBLE ;
  3086.     COLOR N/W,N/W,R+*/W SHADOW
  3087. ACTIVATE SCREEN
  3088. ACTIVATE WINDOW bugbox
  3089. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3090. @ 2, 1 SAY "There's a problem with the Multiplan " + ;
  3091.     "SYLK file that"
  3092. @ 3, 1 SAY "is being imported.  The SYLK " + ;
  3093.     "file may be corrupted"
  3094. @ 4, 1 SAY "or it may be that the file is a " + ;
  3095.     "Multiplan 4.01 file"
  3096. @ 5, 1 SAY "which uses the MOD file structure " + ;
  3097.     "rather than SYLK."
  3098. @ 7,20 SAY "Please contact"
  3099. SELECT 0
  3100. USE callwhom
  3101. * ========================================
  3102. *$ Get info on appropriate person to call
  3103. * ========================================
  3104. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3105. STORE ALLTRIM(callwhom->call_who) TO m_call
  3106. STORE ALLTRIM(callwhom->other) TO m_title
  3107. STORE ALLTRIM(callwhom->phone) TO m_phone
  3108. @ 8, 0 SAY PADC(m->m_call, 55)
  3109. @ 9, 0 SAY PADC(m->m_title, 55)
  3110. @10, 0 SAY PADC(m->m_phone, 55)
  3111. @11,17 SAY "to report this problem."
  3112. @13, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3113. DO razberry
  3114. = INKEY(0, "MH")
  3115. RELEASE WINDOW bugbox
  3116. RETURN
  3117. * End procedure BAD_SYLK
  3118.  
  3119.  
  3120. *!*********************************************************************
  3121. *!
  3122. *!      Procedure: NOTRIGHT
  3123. *!
  3124. *!      Called by: PRO2EROR.PRG                      
  3125. *!
  3126. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3127. *!
  3128. *!           Uses: CALLWHOM.DBF       
  3129. *!
  3130. *!*********************************************************************
  3131. PROCEDURE notright
  3132. ***********************************************************************
  3133. *& Error #255 - Not a valid Rapidfile database
  3134. *& Error #256 - Not a valid Framework II database\spreadsheet
  3135. *
  3136. *   Author: Pat Adams  (718) 469-4032
  3137. *   Date: 8/14/91
  3138. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3139. PARAMETERS error_no
  3140. PRIVATE ftype
  3141.  
  3142. IF error_no = 255
  3143.     ftype = "RapidFile"
  3144. ELSE
  3145.     ftype = "Framework II"
  3146. ENDIF (error_no = 255)
  3147.  
  3148. DEFINE WINDOW bugbox FROM 5,14 TO 18,65 DOUBLE ;
  3149.     COLOR N/W,N/W,R+*/W SHADOW
  3150. ACTIVATE SCREEN
  3151. ACTIVATE WINDOW bugbox
  3152. @ 0,15 SAY "   S O R R Y   " COLOR *+R/W
  3153. @ 2, 1 SAY "The file from which you are attempting to import"
  3154. @ 3, 1 SAY "data is not a valid &ftype file."
  3155. @ 5, 7 SAY "If you would like help please contact"
  3156. SELECT 0
  3157. USE callwhom
  3158. * ========================================
  3159. *$ Get info on appropriate person to call
  3160. * ========================================
  3161. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3162. STORE ALLTRIM(callwhom->call_who) TO m_call
  3163. STORE ALLTRIM(callwhom->other) TO m_title
  3164. STORE ALLTRIM(callwhom->phone) TO m_phone
  3165. @ 6, 0 SAY PADC(m->m_call, 50)
  3166. @ 7, 0 SAY PADC(m->m_title, 50)
  3167. @ 8, 0 SAY PADC(m->m_phone, 50)
  3168. @ 9,14 SAY "to report this problem."
  3169. @11, 1 SAY "Press any key to return to Main Menu..."
  3170. DO razberry
  3171. = INKEY(0, "MH")
  3172. RELEASE WINDOW bugbox
  3173. RETURN
  3174. * End procedure NOTRIGHT
  3175.  
  3176.  
  3177.  
  3178. *!*********************************************************************
  3179. *!
  3180. *!      Procedure: BADLOTUS
  3181. *!
  3182. *!      Called by: PRO2EROR.PRG                      
  3183. *!
  3184. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3185. *!
  3186. *!           Uses: CALLWHOM.DBF       
  3187. *!
  3188. *!*********************************************************************
  3189. PROCEDURE badlotus
  3190. ***********************************************************************
  3191. *& Error #297 - Invalid Lotus 1-2-3 version 2.0 file format
  3192. *& Error #1662 - Invalid Lotus 1-2-3 Version 1.0 file format
  3193. *& Error #1678 - Invalid Lotus 1-2-3 version 3.0 file format
  3194. *
  3195. *   Author: Pat Adams  (718) 469-4032
  3196. *   Date: 8/16/91
  3197. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3198. PARAMETERS error_no
  3199. PRIVATE which1
  3200.  
  3201. DO CASE error_no
  3202.     CASE error_no = 297
  3203.         STORE "2.0" TO which1
  3204.         
  3205.     CASE error_no = 1662
  3206.         STORE "1.0" TO which1
  3207.         
  3208.     CASE error_no = 1678
  3209.         STORE "3.0" TO which1
  3210. ENDCASE       error_no
  3211.  
  3212. DEFINE WINDOW bugbox FROM 4,12 TO 17,68 DOUBLE ;
  3213.     COLOR N/W,N/W,R+*/W SHADOW
  3214. ACTIVATE SCREEN
  3215. ACTIVATE WINDOW bugbox
  3216. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3217. @ 2, 1 SAY "The file from which you are " + ;
  3218.     "attempting to import data"
  3219. @ 3, 1 SAY "is not a valid Lotus 1-2-3 " + ;
  3220.     "version &which1 file."
  3221. @ 5, 9 SAY "If you would like help please contact"
  3222. SELECT 0
  3223. USE callwhom
  3224. * ========================================
  3225. *$ Get info on appropriate person to call
  3226. * ========================================
  3227. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3228. STORE ALLTRIM(callwhom->call_who) TO m_call
  3229. STORE ALLTRIM(callwhom->other) TO m_title
  3230. STORE ALLTRIM(callwhom->phone) TO m_phone
  3231. @ 6, 0 SAY PADC(m->m_call, 54)
  3232. @ 7, 0 SAY PADC(m->m_title, 54)
  3233. @ 8, 0 SAY PADC(m->m_phone, 54)
  3234. @ 9,17 SAY "to report this problem."
  3235. @11, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3236. DO razberry
  3237. = INKEY(0, "MH")
  3238. RELEASE WINDOW bugbox
  3239. RETURN
  3240. * End procedure BADLOTUS
  3241.  
  3242.  
  3243. *!*********************************************************************
  3244. *!
  3245. *!      Procedure: BADSYMPH
  3246. *!
  3247. *!      Called by: PRO2EROR.PRG                      
  3248. *!
  3249. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3250. *!
  3251. *!           Uses: CALLWHOM.DBF       
  3252. *!
  3253. *!*********************************************************************
  3254. PROCEDURE badsymph
  3255. ***********************************************************************
  3256. *& Error #1673 - Invalid Symphony version 1.0 file format
  3257. *& Error #1674 - Invalid Symphony version 1.1 file format
  3258. *
  3259. *   Author: Pat Adams  (718) 469-4032
  3260. *   Date: 8/16/91
  3261. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3262. PARAMETERS error_no
  3263. PRIVATE which1
  3264.  
  3265. DO CASE error_no
  3266.     CASE error_no = 1673
  3267.         STORE "1.0" TO which1
  3268.         
  3269.     CASE error_no = 1674
  3270.         STORE "1.1" TO which1
  3271. ENDCASE       error_no
  3272.  
  3273. DEFINE WINDOW bugbox FROM 4,12 TO 17,68 DOUBLE ;
  3274.     COLOR N/W,N/W,R+*/W SHADOW
  3275. ACTIVATE SCREEN
  3276. ACTIVATE WINDOW bugbox
  3277. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3278. @ 2, 1 SAY "The file from which you are " + ;
  3279.     "attempting to import data"
  3280. @ 3, 1 SAY "is not a valid Symphony " + ;
  3281.     "version &which1 file."
  3282. @ 5, 9 SAY "If you would like help please contact"
  3283. SELECT 0
  3284. USE callwhom
  3285. * ========================================
  3286. *$ Get info on appropriate person to call
  3287. * ========================================
  3288. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3289. STORE ALLTRIM(callwhom->call_who) TO m_call
  3290. STORE ALLTRIM(callwhom->other) TO m_title
  3291. STORE ALLTRIM(callwhom->phone) TO m_phone
  3292. @ 6, 0 SAY PADC(m->m_call, 54)
  3293. @ 7, 0 SAY PADC(m->m_title, 54)
  3294. @ 8, 0 SAY PADC(m->m_phone, 54)
  3295. @ 9,17 SAY "to report this problem."
  3296. @11, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3297. DO razberry
  3298. = INKEY(0, "MH")
  3299. RELEASE WINDOW bugbox
  3300. RETURN
  3301. * End procedure BADSYMPH
  3302.  
  3303.  
  3304. *!*********************************************************************
  3305. *!
  3306. *!      Procedure: BADEXCEL
  3307. *!
  3308. *!      Called by: PRO2EROR.PRG                      
  3309. *!
  3310. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3311. *!
  3312. *!           Uses: CALLWHOM.DBF       
  3313. *!
  3314. *!*********************************************************************
  3315. PROCEDURE badexcel
  3316. ***********************************************************************
  3317. *& Error #1661 - Invalid Excel version 2.0 file format
  3318. *
  3319. *   Author: Pat Adams  (718) 469-4032
  3320. *   Date: 8/16/91
  3321. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3322. DEFINE WINDOW bugbox FROM 4,12 TO 17,68 DOUBLE ;
  3323.     COLOR N/W,N/W,R+*/W SHADOW
  3324. ACTIVATE SCREEN
  3325. ACTIVATE WINDOW bugbox
  3326. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3327. @ 2, 1 SAY "The file from which you are " + ;
  3328.     "attempting to import data"
  3329. @ 3, 1 SAY "is not a valid Excel " + ;
  3330.     "version 2.0 file."
  3331. @ 5, 9 SAY "If you would like help please contact"
  3332. SELECT 0
  3333. USE callwhom
  3334. * ========================================
  3335. *$ Get info on appropriate person to call
  3336. * ========================================
  3337. LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3338. STORE ALLTRIM(callwhom->call_who) TO m_call
  3339. STORE ALLTRIM(callwhom->other) TO m_title
  3340. STORE ALLTRIM(callwhom->phone) TO m_phone
  3341. @ 6, 0 SAY PADC(m->m_call, 54)
  3342. @ 7, 0 SAY PADC(m->m_title, 54)
  3343. @ 8, 0 SAY PADC(m->m_phone, 54)
  3344. @ 9,17 SAY "to report this problem."
  3345. @11, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3346. DO razberry
  3347. = INKEY(0, "MH")
  3348. RELEASE WINDOW bugbox
  3349. RETURN
  3350. * End procedure BADEXCEL
  3351.  
  3352.  
  3353. *!*********************************************************************
  3354. *!
  3355. *!      Procedure: SQL_INTL
  3356. *!
  3357. *!      Called by: PRO2EROR.PRG                      
  3358. *!
  3359. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3360. *!
  3361. *!           Uses: CALLWHOM.DBF       
  3362. *!
  3363. *!*********************************************************************
  3364. PROCEDURE sql_intl
  3365. ***********************************************************************
  3366. *& Error #800 -SQL Internal Err
  3367. *
  3368. *   User is instructed to call developer and then is
  3369. *   returned to DOS since the internal SQL error may
  3370. *   disrupt memory management.  Developer should report
  3371. *   details of the problem to Fox Software Technical
  3372. *   Support
  3373. *
  3374. *   Author: Pat Adams  (718) 469-4032
  3375. *   Date: 8/16/91
  3376. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3377. DEFINE WINDOW bugbox FROM 4,17 TO 19,63 DOUBLE ;
  3378.     COLOR N/W,N/W,R+*/W SHADOW
  3379. ACTIVATE SCREEN
  3380. ACTIVATE WINDOW bugbox
  3381. @ 0,12 SAY "   W H O O P S   " COLOR *+R/W
  3382. @ 2, 1 SAY "An internal SQL error has occurred.  This"
  3383. @ 3, 1 SAY "may disrupt other memory management, there-"
  3384. @ 4, 1 SAY "fore, you will be returned to DOS.  You can"
  3385. @ 5, 1 SAY "then restart the application."
  3386. @ 7,15 SAY "Please contact"
  3387. SELECT 0
  3388. USE callwhom
  3389. * ========================================
  3390. *$ Get info on appropriate person to call
  3391. * ========================================
  3392. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  3393. STORE ALLTRIM(callwhom->call_who) TO m_call
  3394. STORE ALLTRIM(callwhom->other) TO m_title
  3395. STORE ALLTRIM(callwhom->phone) TO m_phone
  3396. @ 8, 0 SAY PADC(m->m_call, 45)
  3397. @ 9, 0 SAY PADC(m->m_title, 45)
  3398. @10, 0 SAY PADC(m->m_phone, 45)
  3399. @11, 5 SAY "immediately to report this problem."
  3400. @13, 1 SAY "Press any key to quit to DOS..." COLOR +N/W
  3401. DO razberry
  3402. = INKEY(0, "MH")
  3403. RELEASE WINDOW bugbox
  3404. RETURN
  3405. *End procedure SQL_INTL
  3406.  
  3407.  
  3408. *!*********************************************************************
  3409. *!
  3410. *!      Procedure: SQL_IDX
  3411. *!
  3412. *!      Called by: PRO2EROR.PRG                      
  3413. *!
  3414. *!          Calls: ISLAN              (procedure in PRO2EROR.PRG)
  3415. *!               : RAZBERRY           (procedure in PRO2EROR.PRG)
  3416. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  3417. *!
  3418. *!*********************************************************************
  3419. PROCEDURE sql_idx
  3420. ***********************************************************************
  3421. *& Error #831 - SQL err building temporary index
  3422. *
  3423. *   The temporary index necessary to the SQL query
  3424. *   count not be built.  Possible causes are:
  3425. *
  3426. *   1.  Insufficient disk space on the local hard disk
  3427. *
  3428. *   2.  User may not have the necessary "rights"
  3429. *       on the LAN server
  3430. *
  3431. *   3.  Insufficient space in the LAN subdirectory
  3432. *
  3433. *   Because of the potential for insufficient disk
  3434. *   space no attempt is made to close databases or
  3435. *   save the error information except via hard copy.
  3436. *
  3437. *   Author: Pat Adams  (718) 469-4032
  3438. *   Date: 8/16/91
  3439. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3440. PARAMETERS doprint
  3441.  
  3442. IF islan()
  3443.     * ================================
  3444.     * Assumption is that a LAN printer
  3445.     * will always be available
  3446.     * ================================
  3447.     DEFINE WINDOW bugbox FROM 3,7 TO 20,73 DOUBLE ;
  3448.         COLOR N/W,N/W,R+*/W SHADOW
  3449.     ACTIVATE SCREEN
  3450.     ACTIVATE WINDOW bugbox
  3451.     @ 0,24 SAY "  BAD NEWS  " COLOR *+R/W
  3452.     @ 2, 1 SAY "Unable to build the temporary index " + ;
  3453.         "required for the SQL query."
  3454.     @ 3, 1 SAY "Possible causes may be:"
  3455.     @ 5, 4 SAY "a.  You have run out of disk " + ;
  3456.         "space on your local hard disk;"
  3457.     @ 7, 4 SAY "b.  You have run out of space " + ;
  3458.         "in the LAN subdirectory;"
  3459.     @ 9, 4 SAY "c.  You do not have the appropriate " + ;
  3460.         "user rights on the LAN"
  3461.     @11, 1 SAY "Information on the problem will " + ;
  3462.         "be sent to the printer.  Please"
  3463.     @12, 1 SAY "contact your LAN administrator " + ;
  3464.         "immediately and provide a copy"
  3465.     @13, 1 SAY "of the error information."
  3466.     @15, 1 SAY "Press any key to print and then " + ;
  3467.         "return to DOS..." COLOR +N/W
  3468.     DO razberry
  3469.     = INKEY(0, "MH")
  3470.     STORE .T. TO doprint
  3471. ELSE
  3472.     * ======================================
  3473.     *$ Otherwise provide info pertinent to
  3474.     *$ single user situation
  3475.     * ======================================
  3476.     DEFINE WINDOW bugbox FROM 7,13 TO 16,66 DOUBLE ;
  3477.         COLOR N/W,N/W,R+*/W SHADOW
  3478.     ACTIVATE SCREEN
  3479.     ACTIVATE WINDOW bugbox
  3480.     @ 0,15 SAY "  REALLY BAD NEWS  " COLOR *+R/W
  3481.     @ 2, 1 SAY "Unable to build the temporary index required for"
  3482.     @ 3, 1 SAY "the SQL query.  It is likely that you have run out"
  3483.     @ 4, 1 SAY "of disk space."
  3484.     DO razberry
  3485.     @ 6, 1 SAY "Do you have a printer available to print out error"
  3486.     @ 7, 1 SAY "information before returning to DOS?   (Y/N)"
  3487.     DO yes_no WITH doprint
  3488.     
  3489.     IF doprint
  3490.         DEFINE WINDOW makesure FROM 9,10 TO 12,70 "░", ;
  3491.             "░","░","░","░","░","░","░" ;
  3492.             COLOR W+*/N,N/W,W+*/N SHADOW
  3493.         ACTIVATE SCREEN
  3494.         ACTIVATE WINDOW makesure
  3495.         @ 0, 0 SAY REPLICATE("░",59)
  3496.         @ 1, 0 SAY REPLICATE("░",59)
  3497.         @ 0, 2 SAY "Please make sure your printer " + ;
  3498.             "is turned on and on-line."
  3499.         @ 1,12 SAY " Press any key to begin printing..."
  3500.         = INKEY(0, "MH")
  3501.         RELEASE WINDOW makesure
  3502.     ENDIF (doprint)
  3503. ENDIF (islan())
  3504.  
  3505. RELEASE WINDOW bugbox
  3506. RETURN doprint
  3507. * End procedure SQL_IDX
  3508.  
  3509.  
  3510. *!*********************************************************************
  3511. *!
  3512. *!      Procedure: SQLTRASH
  3513. *!
  3514. *!      Called by: PRO2EROR.PRG                      
  3515. *!
  3516. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3517. *!
  3518. *!           Uses: CALLWHOM.DBF       
  3519. *!
  3520. *!*********************************************************************
  3521. PROCEDURE sqltrash
  3522. ***********************************************************************
  3523. *& Error #821 - SQL invalid temporary file
  3524. *
  3525. *   The temporary file created by FoxPro for the SQL
  3526. *   query has been corrupted.
  3527. *
  3528. *   Author: Pat Adams  (718) 469-4032
  3529. *   Date: 8/16/91
  3530. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3531. DEFINE WINDOW bugbox FROM 5,18 TO 19,61 DOUBLE ;
  3532.     COLOR N/W,N/W,R+*/W SHADOW
  3533. ACTIVATE SCREEN
  3534. ACTIVATE WINDOW bugbox
  3535. @ 0,12 SAY "   S O R R Y   " COLOR *+R/W
  3536. @ 2, 1 SAY "The temporary file for the SQL query has"
  3537. @ 3, 1 SAY "been corrupted.  If this error recurrs"
  3538. @ 4, 1 SAY "consistenty please contact:"
  3539. SELECT 0
  3540. USE callwhom
  3541. * ========================================
  3542. *$ Get info on appropriate person to call
  3543. * ========================================
  3544. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  3545. STORE ALLTRIM(callwhom->call_who) TO m_call
  3546. STORE ALLTRIM(callwhom->other) TO m_title
  3547. STORE ALLTRIM(callwhom->phone) TO m_phone
  3548. @ 6, 0 SAY PADC(m->m_call, 42)
  3549. @ 7, 0 SAY PADC(m->m_title, 42)
  3550. @ 8, 0 SAY PADC(m->m_phone, 42)
  3551. @10,10 SAY "to report the problem."
  3552. @12, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3553. DO razberry
  3554. = INKEY(0, "MH")
  3555. RELEASE WINDOW bugbox
  3556. RETURN
  3557. * End procedure SQLTRASH
  3558.  
  3559.  
  3560. *!*********************************************************************
  3561. *!
  3562. *!      Procedure: NOSQLIDX
  3563. *!
  3564. *!      Called by: PRO2EROR.PRG                      
  3565. *!
  3566. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3567. *!
  3568. *!           Uses: CALLWHOM.DBF       
  3569. *!
  3570. *!*********************************************************************
  3571. PROCEDURE nosqlidx
  3572. ***********************************************************************
  3573. *& Error #830 - SQL index not found
  3574. *
  3575. *   This may be the result of an incorrect PATH setting
  3576. *
  3577. *   Author: Pat Adams  (718) 469-4032
  3578. *   Date: 8/16/91
  3579. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3580. DEFINE WINDOW bugbox FROM 5,23 TO 19,56 DOUBLE ;
  3581.     COLOR N/W,N/W,R+*/W SHADOW
  3582. ACTIVATE SCREEN
  3583. ACTIVATE WINDOW bugbox
  3584. @ 0, 7 SAY "   S O R R Y   " COLOR *+R/W
  3585. @ 2, 1 SAY "Not able to find the SQL index"
  3586. @ 3, 1 SAY "required for this query."
  3587. @ 5, 9 SAY "Please contact"
  3588. SELECT 0
  3589. USE callwhom
  3590. * ========================================
  3591. *$ Get info on appropriate person to call
  3592. * ========================================
  3593. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  3594. STORE ALLTRIM(callwhom->call_who) TO m_call
  3595. STORE ALLTRIM(callwhom->other) TO m_title
  3596. STORE ALLTRIM(callwhom->phone) TO m_phone
  3597. * ===========================================
  3598. * NOTE: Size of window may have to be enlarged
  3599. * if trimmed data in CALLWHOM is longer than
  3600. * the BUGBOX window
  3601. * ===========================================
  3602. @ 6, 0 SAY PADC(m->m_call, 32)
  3603. @ 7, 0 SAY PADC(m->m_title, 32)
  3604. @ 8, 0 SAY PADC(m->m_phone, 32)
  3605. @ 9, 5 SAY "to report the problem."
  3606. @11, 1 SAY "Press any key to" COLOR +N/W
  3607. @12, 1 SAY "return to Main Menu..." COLOR +N/W
  3608. DO razberry
  3609. = INKEY(o, "MH")
  3610. RELEASE WINDOW bugbox
  3611. RETURN
  3612. * End procedure NOSQLIDX
  3613.  
  3614.  
  3615.  
  3616. *!*********************************************************************
  3617. *!
  3618. *!      Procedure: SQLABORT
  3619. *!
  3620. *!      Called by: PRO2EROR.PRG                      
  3621. *!
  3622. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3623. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  3624. *!
  3625. *!*********************************************************************
  3626. PROCEDURE sqlabort
  3627. ***********************************************************************
  3628. *& Error #839 - SQL cancelled operation
  3629. *
  3630. *   User pressed ESC key.  Determine if user
  3631. *   really wants to abort the query.
  3632. *
  3633. *   Author: Pat Adams  (718) 469-4032
  3634. *   Date: 8/16/91
  3635. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3636. PARAMETERS a_bort
  3637. DEFINE WINDOW bugbox FROM 10,19 TO 13,60 DOUBLE ;
  3638.     COLOR N/W,N/W,R+*/W SHADOW
  3639. ACTIVATE SCREEN
  3640. ACTIVATE WINDOW bugbox
  3641. @ 0, 1 SAY "You pressed the ESCape key.  Do you"
  3642. @ 1, 1 SAY "really want to cancel the query? (Y/N)"
  3643. DO razberry
  3644. DO yes_no WITH a_bort
  3645. RELEASE WINDOW bugbox
  3646. RETURN a_bort
  3647. * End procedure SQLABORT
  3648.  
  3649.  
  3650.  
  3651. *!*********************************************************************
  3652. *!
  3653. *!      Procedure: BADCLOSE
  3654. *!
  3655. *!      Called by: PRO2EROR.PRG                      
  3656. *!
  3657. *!          Calls: ISLAN              (procedure in PRO2EROR.PRG)
  3658. *!               : RAZBERRY           (procedure in PRO2EROR.PRG)
  3659. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  3660. *!
  3661. *!           Uses: CALLWHOM.DBF       
  3662. *!
  3663. *!*********************************************************************
  3664. PROCEDURE badclose
  3665. ***********************************************************************
  3666. *& Error #1112 - File close error
  3667. *
  3668. *   It may be that the operating system just
  3669. *   "hiccuped" or there may be a hardware problem.
  3670. *   Advise user & provide option to retry.
  3671. *
  3672. *   Author: Pat Adams  (718) 469-4032
  3673. *   Date: 8/16/91
  3674. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3675. PARAMETERS re_try
  3676. DEFINE WINDOW bugbox FROM 4,16 TO 20,67 DOUBLE ;
  3677.     COLOR N/W,N/W,R+*/W SHADOW
  3678. ACTIVATE SCREEN
  3679. ACTIVATE WINDOW bugbox
  3680. @ 0,15 SAY "   W H O O P S   " COLOR *+R/W
  3681. @ 2, 1 SAY "A problem occurred while attempting to close a"
  3682. @ 3, 1 SAY "file.  It may be that the system just didn't get"
  3683. @ 4, 1 SAY "it's coffee and was temporarily feeling grumpy."
  3684. @ 5, 1 SAY "If so, trying again will correct the problem."
  3685. @ 6, 1 SAY "However, if this message continually appears it"
  3686. @ 7, 1 SAY "may be that there is a hardware problem. In that"
  3687. @ 8, 1 SAY "case please contact:"
  3688. SELECT 0
  3689. USE callwhom
  3690. * ========================================
  3691. *$ Get info on appropriate person to call
  3692. * ========================================
  3693. IF islan()
  3694.     LOCATE FOR ALLTRIM(callwhom->title) == "LAN ADMINISTRATOR"
  3695. ELSE
  3696.     LOCATE FOR ALLTRIM(callwhom->title) == "APP ADMINISTRATOR"
  3697. ENDIF (islan())
  3698.  
  3699. STORE ALLTRIM(callwhom->call_who) TO m_call
  3700. STORE ALLTRIM(callwhom->other) TO m_title
  3701. STORE ALLTRIM(callwhom->phone) TO m_phone
  3702. @ 9, 0 SAY PADC(m->m_call, 50)
  3703. @10, 0 SAY PADC(m->m_title, 50)
  3704. @11, 0 SAY PADC(m->m_phone, 50)
  3705. @12,14 SAY "to report the problem."
  3706. DO razberry
  3707. @14, 9 SAY "DO YOU WANT TO TRY AGAIN?  (Y/N)"
  3708. DO yes_no WITH re_try
  3709. RELEASE WINDOW bugbox
  3710. RETURN re_try
  3711. * End procedure BADCLOSE
  3712.  
  3713.  
  3714. *!*********************************************************************
  3715. *!
  3716. *!      Procedure: VERBOSE
  3717. *!
  3718. *!      Called by: PRO2EROR.PRG                      
  3719. *!
  3720. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3721. *!               : YES_NO             (procedure in PRO2EROR.PRG)
  3722. *!
  3723. *!*********************************************************************
  3724. PROCEDURE verbose
  3725. ***********************************************************************
  3726. *$ Error #1201 - Too many names used
  3727. *
  3728. *   The FoxPro NAME TABLE "collects" the "names" used for
  3729. *   memory variables, arrays, data base files and indexes,
  3730. *   field names, procedures, etc. as they are used.  If
  3731. *   this table is exhausted the only thing that can be done
  3732. *   on an immediate basis is to return the user to DOS and
  3733. *   then restart the application.
  3734. *
  3735. *   The developer should modify the code so that memory
  3736. *   variable names, array names, window names, etc. are not
  3737. *   all unique but, rather, are used frequently in various
  3738. *   modules.  Simply use the PRIVATE statement to make sure
  3739. *   memvars and arrays do not conflict with others in use with
  3740. *   the same name at higher levels.
  3741. *
  3742. *   An example of this is the name BUGBOX used repeatedly
  3743. *   for message windows opened by PRO2EROR.
  3744. *
  3745. *   Do not create procedures of the same name, however.
  3746. *
  3747. *   Because the name table is exhausted, it may not be
  3748. *   possible to open the CALLWHOM and PRO2EROR databases.
  3749. *   Therefore, the developer's name must be harded coded
  3750. *   in this module.
  3751. *
  3752. *
  3753. *$ Error #1308 - Stack overflow - expression too complex
  3754. *
  3755. *   Usually occurs because UDF's are nested too deeply.
  3756. *
  3757. *   Author: Pat Adams  (718) 469-4032
  3758. *   Date: 8/16/91
  3759. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3760. PARAMETERS doprint
  3761. DEFINE WINDOW bugbox FROM 5,10 TO 19,70 DOUBLE ;
  3762.     COLOR N/W,N/W,R+*/W SHADOW
  3763. ACTIVATE SCREEN
  3764. ACTIVATE WINDOW bugbox
  3765. @ 0,19 SAY "   W H O O P S   " COLOR *+R/W
  3766. @ 2, 1 SAY "A problem has occurred that can be cured temporarily by"
  3767. @ 3, 1 SAY "returing to DOS and starting this application over again."
  3768. @ 5,13 SAY "It is important that you contact"
  3769. * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  3770. * NOTE: Developer's name is hard coded here for reasons stated
  3771. * above and must be changed to the appropriate name & phone #
  3772. * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  3773. @ 6, 0 SAY PADC("Developer Name", 58)
  3774. @ 7, 0 SAY PADC("Company Name/Title", 58)
  3775. @ 8, 0 SAY PADC("Phone Number", 58)
  3776. @ 9,18 SAY "to report the problem."
  3777. DO razberry
  3778. @11,12 SAY "DO YOU HAVE A PRINTER AVAILABLE TO"
  3779. @12,12 SAY "PRINT THE ERROR INFORMATION? (Y/N)"
  3780. DO yes_no WITH doprint
  3781.  
  3782. IF doprint
  3783.     DEFINE WINDOW makesure FROM 9,10 TO 12,70 "░", ;
  3784.         "░","░","░","░","░","░","░" ;
  3785.         COLOR W+*/N,N/W,W+*/N SHADOW
  3786.     ACTIVATE SCREEN
  3787.     ACTIVATE WINDOW makesure
  3788.     @ 0, 0 SAY REPLICATE("░",59)
  3789.     @ 1, 0 SAY REPLICATE("░",59)
  3790.     @ 0, 2 SAY "Please make sure your printer " + ;
  3791.         "is turned on and on-line."
  3792.     @ 1,12 SAY " Press any key to begin printing..."
  3793.     = INKEY(0, "MH")
  3794.     RELEASE WINDOW makesure
  3795. ENDIF (doprint)
  3796.  
  3797. RELEASE WINDOW bugbox
  3798. RETURN doprint
  3799. * End procedure VERBOSE
  3800.  
  3801.  
  3802. *!*********************************************************************
  3803. *!
  3804. *!      Procedure: NORUN
  3805. *!
  3806. *!      Called by: PRO2EROR.PRG                      
  3807. *!
  3808. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3809. *!
  3810. *!           Uses: CALLWHOM.DBF       
  3811. *!
  3812. *!*********************************************************************
  3813. PROCEDURE norun
  3814. ***********************************************************************
  3815. *& Error #1405 - RUN/! command failed
  3816. *
  3817. *   Either there is insufficient free memory to execute the
  3818. *   program to be run from DOS or COMMAND.COM can not be found.
  3819. *   In the latter case make sure that the DOS COMMAND.COM is
  3820. *   accessibe via the DOS environmental COMSPEC=
  3821. *
  3822. *   Author: Pat Adams  (718) 469-4032
  3823. *   Date: 8/16/91
  3824. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3825. DEFINE WINDOW bugbox FROM 4,12 TO 20,67 DOUBLE ;
  3826.     COLOR N/W,N/W,R+*/W SHADOW
  3827. ACTIVATE SCREEN
  3828. ACTIVATE WINDOW bugbox
  3829. @ 0,18 SAY "   S O R R Y   " COLOR *+R/W
  3830. @ 2, 1 SAY "It was not possible to run a DOS program because:"
  3831. @ 4, 2 SAY "a.  Your computer does not have sufficient memory;"
  3832. @ 6, 2 SAY "b.  The DOS COMMAND.COM program could not be found."
  3833. @ 8,20 SAY "Please contact"
  3834. SELECT 0
  3835. USE callwhom
  3836. * ========================================
  3837. *$ Get info on appropriate person to call
  3838. * ========================================
  3839. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  3840. STORE ALLTRIM(callwhom->call_who) TO m_call
  3841. STORE ALLTRIM(callwhom->other) TO m_title
  3842. STORE ALLTRIM(callwhom->phone) TO m_phone
  3843. @ 9, 0 SAY PADC(m->m_call, 54)
  3844. @10, 0 SAY PADC(m->m_title, 54)
  3845. @11, 0 SAY PADC(m->m_phone, 54)
  3846. @12,16 SAY "to report this problem."
  3847. DO razberry
  3848. @14, 1 SAY "Press any key to return to Main Menu..." COLOR +N/W
  3849. = INKEY(0, "MH")
  3850. RELEASE WINDOW bugbox
  3851. RETURN
  3852. * End procedure NORUN
  3853.  
  3854.  
  3855. *!*********************************************************************
  3856. *!
  3857. *!      Procedure: BADCHAIN
  3858. *!
  3859. *!      Called by: PRO2EROR.PRG                      
  3860. *!
  3861. *!          Calls: RAZBERRY           (procedure in PRO2EROR.PRG)
  3862. *!
  3863. *!           Uses: CALLWHOM.DBF       
  3864. *!
  3865. *!*********************************************************************
  3866. PROCEDURE badchain
  3867. ***********************************************************************
  3868. *& Error #1012 - OS memory error
  3869. *
  3870. *   The DOS free memory chain has been scrambled.
  3871. *   The immediate solution is to return to DOS and
  3872. *   restart the application.
  3873. *
  3874. *   If the problem persists and/or is not cured by a
  3875. *   reboot the developer should look to the EMS memory
  3876. *   manager as the probable culprit.
  3877. *
  3878. *   Author: Pat Adams  (718) 469-4032
  3879. *   Date: 8/16/91
  3880. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3881. DEFINE WINDOW bugbox FROM 5,14 TO 19,66 DOUBLE ;
  3882.     COLOR N/W,N/W,R*/W SHADOW
  3883. ACTIVATE SCREEN
  3884. ACTIVATE WINDOW bugbox
  3885. @ 0,15 SAY "   W H O O P S   " COLOR *+R/W
  3886. @ 2, 1 SAY "Something has scrambled your computer's memory."
  3887. @ 3, 1 SAY "You will be returned to DOS and can restart the"
  3888. @ 4, 1 SAY "application.  If the problem persists try turning"
  3889. @ 5, 1 SAY "off the computer and starting it again.  If the"
  3890. @ 6, 1 SAY "problem still persists contact:"
  3891. SELECT 0
  3892. USE callwhom
  3893. * ========================================
  3894. *$ Get info on appropriate person to call
  3895. * ========================================
  3896. LOCATE FOR ALLTRIM(callwhom->title) == "DEVELOPER"
  3897. STORE ALLTRIM(callwhom->call_who) TO m_call
  3898. STORE ALLTRIM(callwhom->other) TO m_title
  3899. STORE ALLTRIM(callwhom->phone) TO m_phone
  3900. @ 8, 0 SAY PADC(m->m_call, 50)
  3901. @ 9, 0 SAY PADC(m->m_title, 50)
  3902. @10, 0 SAY PADC(m->m_phone, 50)
  3903. DO razberry
  3904. @12, 1 SAY "Press any key to return to DOS..." COLOR +N/W
  3905. RELEASE WINDOW bugbox
  3906. RETURN
  3907. * End procedure BADCHAIN
  3908.  
  3909.  
  3910.  
  3911. *!*********************************************************************
  3912. *!
  3913. *!      Procedure: KANCEL
  3914. *!
  3915. *!      Called by: LOGVIEW            (procedure in PRO2EROR.PRG)
  3916. *!
  3917. *!*********************************************************************
  3918. PROCEDURE kancel
  3919. ***********************************************************************
  3920. *& Cancel program and return to command window
  3921. *
  3922. *   Author: Pat Adams  (718) 469-4032
  3923. *   Date: 8/22/91
  3924. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3925. ON KEY          && Null out hot keys
  3926. CLEAR GETS
  3927. CLEAR READ ALL
  3928. CLEAR FIELDS
  3929. CLEAR MACROS
  3930. CLEAR WINDOWS
  3931. DEACTIVATE MENUS
  3932. CLEAR MENUS
  3933. DEACTIVATE POPUPS
  3934. CLEAR POPUPS
  3935. CLEAR PROMPT
  3936. SET REFRESH TO 0
  3937. SET DEVICE TO SCREEN
  3938. CLOSE DATA
  3939. CLOSE PROCEDURE
  3940. CLEAR MEMORY
  3941. PUBLIC testing
  3942. STORE .T. TO testing
  3943. CANCEL
  3944. * End procedure KANCEL
  3945. *: EOF: PRO2EROR.PRG
  3946.